diff options
Diffstat (limited to 'bgpd/bgp_nexthop.c')
-rw-r--r-- | bgpd/bgp_nexthop.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index bb07eace..24068141 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -43,9 +43,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "zebra/zserv.h" /* For ZEBRA_SERV_PATH. */ struct bgp_nexthop_cache *zlookup_query (struct in_addr); -#ifdef HAVE_IPV6 struct bgp_nexthop_cache *zlookup_query_ipv6 (struct in6_addr *); -#endif /* HAVE_IPV6 */ /* Only one BGP scan thread are activated at the same time. */ static struct thread *bgp_scan_thread = NULL; @@ -133,7 +131,6 @@ bgp_nexthop_same (struct nexthop *next1, struct nexthop *next2) if (next1->ifindex != next2->ifindex) return 0; break; -#ifdef HAVE_IPV6 case ZEBRA_NEXTHOP_IPV6: if (! IPV6_ADDR_SAME (&next1->gate.ipv6, &next2->gate.ipv6)) return 0; @@ -145,7 +142,6 @@ bgp_nexthop_same (struct nexthop *next1, struct nexthop *next2) if (next1->ifindex != next2->ifindex) return 0; break; -#endif /* HAVE_IPV6 */ default: /* do nothing */ break; @@ -197,7 +193,6 @@ bgp_nexthop_onlink (afi_t afi, struct attr *attr) return 1; } } -#ifdef HAVE_IPV6 else if (afi == AFI_IP6) { if (attr->extra->mp_nexthop_len == 32) @@ -216,11 +211,9 @@ bgp_nexthop_onlink (afi_t afi, struct attr *attr) } } } -#endif /* HAVE_IPV6 */ return 0; } -#ifdef HAVE_IPV6 /* Check specified next-hop is reachable or not. */ static int bgp_nexthop_lookup_ipv6 (struct peer *peer, struct bgp_info *ri, int *changed, @@ -305,7 +298,6 @@ bgp_nexthop_lookup_ipv6 (struct peer *peer, struct bgp_info *ri, int *changed, return bnc->valid; } -#endif /* HAVE_IPV6 */ /* Check specified next-hop is reachable or not. */ int @@ -325,10 +317,8 @@ bgp_nexthop_lookup (afi_t afi, struct peer *peer, struct bgp_info *ri, return 1; } -#ifdef HAVE_IPV6 if (afi == AFI_IP6) return bgp_nexthop_lookup_ipv6 (peer, ri, changed, metricchanged); -#endif /* HAVE_IPV6 */ addr = ri->attr->nexthop; @@ -538,9 +528,7 @@ bgp_scan_timer (struct thread *t) bgp_scan (AFI_IP, SAFI_UNICAST); -#ifdef HAVE_IPV6 bgp_scan (AFI_IP6, SAFI_UNICAST); -#endif /* HAVE_IPV6 */ return 0; } @@ -684,7 +672,6 @@ bgp_connected_add (struct connected *ifc) rn->info = bc; } } -#ifdef HAVE_IPV6 else if (addr->family == AF_INET6) { apply_mask_ipv6 ((struct prefix_ipv6 *) &p); @@ -708,7 +695,6 @@ bgp_connected_add (struct connected *ifc) rn->info = bc; } } -#endif /* HAVE_IPV6 */ } void @@ -751,7 +737,6 @@ bgp_connected_delete (struct connected *ifc) bgp_unlock_node (rn); bgp_unlock_node (rn); } -#ifdef HAVE_IPV6 else if (addr->family == AF_INET6) { apply_mask_ipv6 ((struct prefix_ipv6 *) &p); @@ -776,7 +761,6 @@ bgp_connected_delete (struct connected *ifc) bgp_unlock_node (rn); bgp_unlock_node (rn); } -#endif /* HAVE_IPV6 */ } int @@ -899,7 +883,6 @@ zlookup_query (struct in_addr addr) return zlookup_read (); } -#ifdef HAVE_IPV6 static struct bgp_nexthop_cache * zlookup_read_ipv6 (void) { @@ -1002,7 +985,6 @@ zlookup_query_ipv6 (struct in6_addr *addr) return zlookup_read_ipv6 (); } -#endif /* HAVE_IPV6 */ static int bgp_import_check (struct prefix *p, u_int32_t *igpmetric, @@ -1321,7 +1303,6 @@ show_ip_bgp_scan_tables (struct vty *vty, const char detail) inet_ntop (AF_INET, &rn->p.u.prefix4, buf, INET6_ADDRSTRLEN), VTY_NEWLINE); } -#ifdef HAVE_IPV6 { for (rn = bgp_table_top (bgp_nexthop_cache_table[AFI_IP6]); rn; @@ -1353,7 +1334,6 @@ show_ip_bgp_scan_tables (struct vty *vty, const char detail) VTY_NEWLINE); } } -#endif /* HAVE_IPV6 */ vty_out (vty, "BGP connected route:%s", VTY_NEWLINE); for (rn = bgp_table_top (bgp_connected_table[AFI_IP]); @@ -1363,7 +1343,6 @@ show_ip_bgp_scan_tables (struct vty *vty, const char detail) vty_out (vty, " %s/%d%s", inet_ntoa (rn->p.u.prefix4), rn->p.prefixlen, VTY_NEWLINE); -#ifdef HAVE_IPV6 { for (rn = bgp_table_top (bgp_connected_table[AFI_IP6]); rn; @@ -1374,7 +1353,6 @@ show_ip_bgp_scan_tables (struct vty *vty, const char detail) rn->p.prefixlen, VTY_NEWLINE); } -#endif /* HAVE_IPV6 */ return CMD_SUCCESS; } @@ -1426,12 +1404,10 @@ bgp_scan_init (void) bgp_connected_table[AFI_IP] = bgp_table_init (AFI_IP, SAFI_UNICAST); -#ifdef HAVE_IPV6 cache1_table[AFI_IP6] = bgp_table_init (AFI_IP6, SAFI_UNICAST); cache2_table[AFI_IP6] = bgp_table_init (AFI_IP6, SAFI_UNICAST); bgp_nexthop_cache_table[AFI_IP6] = cache1_table[AFI_IP6]; bgp_connected_table[AFI_IP6] = bgp_table_init (AFI_IP6, SAFI_UNICAST); -#endif /* HAVE_IPV6 */ /* Make BGP scan thread. */ bgp_scan_thread = thread_add_timer (bm->master, bgp_scan_timer, @@ -1464,7 +1440,6 @@ bgp_scan_finish (void) bgp_table_unlock (bgp_connected_table[AFI_IP]); bgp_connected_table[AFI_IP] = NULL; -#ifdef HAVE_IPV6 if (cache1_table[AFI_IP6]) bgp_table_unlock (cache1_table[AFI_IP6]); cache1_table[AFI_IP6] = NULL; @@ -1476,7 +1451,6 @@ bgp_scan_finish (void) if (bgp_connected_table[AFI_IP6]) bgp_table_unlock (bgp_connected_table[AFI_IP6]); bgp_connected_table[AFI_IP6] = NULL; -#endif /* HAVE_IPV6 */ } void |