]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix crash in 'show ip nexthop'
authorDonald Sharp <sharpd@cumulusnetwroks.com>
Mon, 5 Sep 2016 00:05:16 +0000 (20:05 -0400)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Mon, 5 Sep 2016 00:05:16 +0000 (20:05 -0400)
With the addition of the AFI_ETHER we need
to initialize the appropriate tables for
nexthop's.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_nexthop.c

index c38d54ef7d474261c5a41c578f468466a876014e..1e5c4cf8b00ede596e5981fc8999814368a5f1b1 100644 (file)
@@ -564,12 +564,13 @@ bgp_scan_init (struct bgp *bgp)
   bgp->connected_table[AFI_IP] = bgp_table_init (AFI_IP, SAFI_UNICAST);
   bgp->import_check_table[AFI_IP] = bgp_table_init (AFI_IP, SAFI_UNICAST);
 
-#ifdef HAVE_IPV6
   bgp->nexthop_cache_table[AFI_IP6] = bgp_table_init (AFI_IP6, SAFI_UNICAST);
   bgp->connected_table[AFI_IP6] = bgp_table_init (AFI_IP6, SAFI_UNICAST);
   bgp->import_check_table[AFI_IP6] = bgp_table_init (AFI_IP6, SAFI_UNICAST);
-#endif /* HAVE_IPV6 */
 
+  bgp->nexthop_cache_table[AFI_ETHER] = bgp_table_init (AFI_ETHER, SAFI_UNICAST);
+  bgp->connected_table[AFI_ETHER] = bgp_table_init (AFI_ETHER, SAFI_UNICAST);
+  bgp->import_check_table[AFI_ETHER] = bgp_table_init (AFI_ETHER, SAFI_UNICAST);
 }
 
 void