From 205e6744f2dc2909dd494c9ce8acb82821459f1f Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 12 Jan 2016 13:42:11 -0500 Subject: bgpd: remove HAVE_IPV6 conditionals Signed-off-by: Lou Berger Tested-by: NetDEF CI System --- bgpd/bgp_attr.c | 17 +---- bgpd/bgp_attr.h | 2 - bgpd/bgp_debug.c | 2 - bgpd/bgp_encap.c | 31 +++----- bgpd/bgp_mpath.c | 4 - bgpd/bgp_mplsvpn.c | 8 -- bgpd/bgp_network.c | 51 ------------- bgpd/bgp_nexthop.c | 26 ------- bgpd/bgp_open.c | 2 - bgpd/bgp_packet.c | 4 - bgpd/bgp_route.c | 213 ++++------------------------------------------------ bgpd/bgp_routemap.c | 8 -- bgpd/bgp_table.h | 4 - bgpd/bgp_vty.c | 100 ++---------------------- bgpd/bgp_zebra.c | 18 +---- bgpd/bgp_zebra.h | 2 - bgpd/bgpd.h | 2 - 17 files changed, 33 insertions(+), 461 deletions(-) (limited to 'bgpd') diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 5dc118be..888f11a1 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -511,11 +511,9 @@ attrhash_key_make (void *p) if (extra->transit) MIX(transit_hash_key_make (extra->transit)); -#ifdef HAVE_IPV6 MIX(extra->mp_nexthop_len); key = jhash(extra->mp_nexthop_global.s6_addr, 16, key); key = jhash(extra->mp_nexthop_local.s6_addr, 16, key); -#endif /* HAVE_IPV6 */ } return key; @@ -542,11 +540,9 @@ attrhash_cmp (const void *p1, const void *p2) && ae1->aggregator_as == ae2->aggregator_as && ae1->aggregator_addr.s_addr == ae2->aggregator_addr.s_addr && ae1->weight == ae2->weight -#ifdef HAVE_IPV6 && ae1->mp_nexthop_len == ae2->mp_nexthop_len && IPV6_ADDR_SAME (&ae1->mp_nexthop_global, &ae2->mp_nexthop_global) && IPV6_ADDR_SAME (&ae1->mp_nexthop_local, &ae2->mp_nexthop_local) -#endif /* HAVE_IPV6 */ && IPV4_ADDR_SAME (&ae1->mp_nexthop_global_in, &ae2->mp_nexthop_global_in) && ae1->ecommunity == ae2->ecommunity && ae1->cluster == ae2->cluster @@ -696,9 +692,7 @@ bgp_attr_default_set (struct attr *attr, u_char origin) attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_AS_PATH); attr->extra->weight = BGP_ATTR_DEFAULT_WEIGHT; attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_NEXT_HOP); -#ifdef HAVE_IPV6 attr->extra->mp_nexthop_len = IPV6_MAX_BYTELEN; -#endif return attr; } @@ -757,9 +751,8 @@ bgp_attr_aggregate_intern (struct bgp *bgp, u_char origin, } attre.weight = BGP_ATTR_DEFAULT_WEIGHT; -#ifdef HAVE_IPV6 attre.mp_nexthop_len = IPV6_MAX_BYTELEN; -#endif + if (! as_set) attr.flag |= ATTR_FLAG_BIT (BGP_ATTR_ATOMIC_AGGREGATE); attr.flag |= ATTR_FLAG_BIT (BGP_ATTR_AGGREGATOR); @@ -1658,7 +1651,6 @@ bgp_mp_reach_parse (struct bgp_attr_parser_args *args, stream_getl (s); /* RD low */ stream_get (&attre->mp_nexthop_global_in, s, 4); break; -#ifdef HAVE_IPV6 case 24: { u_int32_t rd_high __attribute__((unused)); @@ -1705,7 +1697,6 @@ bgp_mp_reach_parse (struct bgp_attr_parser_args *args, attre->mp_nexthop_len = 16; } break; -#endif /* HAVE_IPV6 */ default: zlog_info ("%s: (%s) Wrong multiprotocol next hop length: %d", __func__, peer->host, attre->mp_nexthop_len); @@ -2434,7 +2425,6 @@ bgp_packet_mpattr_start (struct stream *s, afi_t afi, safi_t safi, break; } break; -#ifdef HAVE_IPV6 case AFI_IP6: switch (safi) { @@ -2480,7 +2470,6 @@ bgp_packet_mpattr_start (struct stream *s, afi_t afi, safi_t safi, break; } break; -#endif /*HAVE_IPV6*/ default: break; } @@ -3063,9 +3052,7 @@ bgp_dump_routes_attr (struct stream *s, struct attr *attr, /* Nexthop attribute. */ /* If it's an IPv6 prefix, don't dump the IPv4 nexthop to save space */ if(prefix != NULL -#ifdef HAVE_IPV6 && prefix->family != AF_INET6 -#endif /* HAVE_IPV6 */ ) { stream_putc (s, BGP_ATTR_FLAG_TRANS); @@ -3129,7 +3116,6 @@ bgp_dump_routes_attr (struct stream *s, struct attr *attr, stream_put (s, attr->community->val, attr->community->size * 4); } -#ifdef HAVE_IPV6 /* Add a MP_NLRI attribute to dump the IPv6 next hop */ if (prefix != NULL && prefix->family == AF_INET6 && attr->extra && (attr->extra->mp_nexthop_len == 16 || attr->extra->mp_nexthop_len == 32) ) @@ -3161,7 +3147,6 @@ bgp_dump_routes_attr (struct stream *s, struct attr *attr, /* Set MP attribute length. */ stream_putc_at (s, sizep, (stream_get_endp (s) - sizep) - 1); } -#endif /* HAVE_IPV6 */ /* Return total size of attribute. */ len = stream_get_endp (s) - cp - 2; diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index 6a134de4..fe6c2a1a 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -61,10 +61,8 @@ struct bgp_attr_encap_subtlv { struct attr_extra { /* Multi-Protocol Nexthop, AFI IPv6 */ -#ifdef HAVE_IPV6 struct in6_addr mp_nexthop_global; struct in6_addr mp_nexthop_local; -#endif /* HAVE_IPV6 */ /* Extended Communities attribute. */ struct ecommunity *ecommunity; diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index e3e5ca46..60e2777e 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -175,7 +175,6 @@ bgp_dump_attr (struct peer *peer, struct attr *attr, char *buf, size_t size) snprintf (buf + strlen (buf), size - strlen (buf), ", origin %s", bgp_origin_str[attr->origin]); -#ifdef HAVE_IPV6 if (attr->extra) { char addrbuf[BUFSIZ]; @@ -192,7 +191,6 @@ bgp_dump_attr (struct peer *peer, struct attr *attr, char *buf, size_t size) inet_ntop (AF_INET6, &attr->extra->mp_nexthop_local, addrbuf, BUFSIZ)); } -#endif /* HAVE_IPV6 */ if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF))) snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %u", diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 48e23122..d0beb1ba 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -511,7 +511,7 @@ DEFUN (show_bgp_ipv4_encap, { return bgp_show_encap (vty, AFI_IP, NULL, bgp_show_type_normal, NULL, 0); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_encap, show_bgp_ipv6_encap_cmd, "show bgp ipv6 encap", @@ -522,7 +522,6 @@ DEFUN (show_bgp_ipv6_encap, { return bgp_show_encap (vty, AFI_IP6, NULL, bgp_show_type_normal, NULL, 0); } -#endif DEFUN (show_bgp_ipv4_encap_rd, show_bgp_ipv4_encap_rd_cmd, @@ -545,7 +544,7 @@ DEFUN (show_bgp_ipv4_encap_rd, } return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_normal, NULL, 0); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_encap_rd, show_bgp_ipv6_encap_rd_cmd, "show bgp ipv6 encap rd ASN:nn_or_IP-address:nn", @@ -568,7 +567,6 @@ DEFUN (show_bgp_ipv6_encap_rd, } return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 0); } -#endif DEFUN (show_bgp_ipv4_encap_tags, show_bgp_ipv4_encap_tags_cmd, @@ -581,7 +579,7 @@ DEFUN (show_bgp_ipv4_encap_tags, { return bgp_show_encap (vty, AFI_IP, NULL, bgp_show_type_normal, NULL, 1); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_encap_tags, show_bgp_ipv6_encap_tags_cmd, "show bgp ipv6 encap tags", @@ -593,7 +591,7 @@ DEFUN (show_bgp_ipv6_encap_tags, { return bgp_show_encap (vty, AFI_IP6, NULL, bgp_show_type_normal, NULL, 1); } -#endif + DEFUN (show_bgp_ipv4_encap_rd_tags, show_bgp_ipv4_encap_rd_tags_cmd, @@ -617,7 +615,7 @@ DEFUN (show_bgp_ipv4_encap_rd_tags, } return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_normal, NULL, 1); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_encap_rd_tags, show_bgp_ipv6_encap_rd_tags_cmd, "show bgp ipv6 encap rd ASN:nn_or_IP-address:nn tags", @@ -640,7 +638,6 @@ DEFUN (show_bgp_ipv6_encap_rd_tags, } return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 1); } -#endif DEFUN (show_bgp_ipv4_encap_neighbor_routes, show_bgp_ipv4_encap_neighbor_routes_cmd, @@ -672,7 +669,7 @@ DEFUN (show_bgp_ipv4_encap_neighbor_routes, return bgp_show_encap (vty, AFI_IP, NULL, bgp_show_type_neighbor, su, 0); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_encap_neighbor_routes, show_bgp_ipv6_encap_neighbor_routes_cmd, "show bgp ipv6 encap neighbors A.B.C.D routes", @@ -703,7 +700,6 @@ DEFUN (show_bgp_ipv6_encap_neighbor_routes, return bgp_show_encap (vty, AFI_IP6, NULL, bgp_show_type_neighbor, su, 0); } -#endif DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes, show_bgp_ipv4_encap_rd_neighbor_routes_cmd, @@ -747,7 +743,7 @@ DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes, return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_neighbor, su, 0); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes, show_bgp_ipv6_encap_rd_neighbor_routes_cmd, "show bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors (A.B.C.D|X:X::X:X) routes", @@ -790,7 +786,6 @@ DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes, return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_neighbor, su, 0); } -#endif DEFUN (show_bgp_ipv4_encap_neighbor_advertised_routes, show_bgp_ipv4_encap_neighbor_advertised_routes_cmd, @@ -822,7 +817,7 @@ DEFUN (show_bgp_ipv4_encap_neighbor_advertised_routes, return show_adj_route_encap (vty, peer, NULL); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_encap_neighbor_advertised_routes, show_bgp_ipv6_encap_neighbor_advertised_routes_cmd, "show bgp ipv6 encap neighbors A.B.C.D advertised-routes", @@ -853,7 +848,6 @@ DEFUN (show_bgp_ipv6_encap_neighbor_advertised_routes, return show_adj_route_encap (vty, peer, NULL); } -#endif DEFUN (show_bgp_ipv4_encap_rd_neighbor_advertised_routes, show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd, @@ -896,7 +890,7 @@ DEFUN (show_bgp_ipv4_encap_rd_neighbor_advertised_routes, return show_adj_route_encap (vty, peer, &prd); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_encap_rd_neighbor_advertised_routes, show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd, "show bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors (A.B.C.D|X:X::X:X) advertised-routes", @@ -938,7 +932,6 @@ DEFUN (show_bgp_ipv6_encap_rd_neighbor_advertised_routes, return show_adj_route_encap (vty, peer, &prd); } -#endif void bgp_encap_init (void) @@ -955,7 +948,6 @@ bgp_encap_init (void) install_element (VIEW_NODE, &show_bgp_ipv4_encap_neighbor_advertised_routes_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd); -#ifdef HAVE_IPV6 install_element (VIEW_NODE, &show_bgp_ipv6_encap_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_encap_tags_cmd); @@ -964,8 +956,6 @@ bgp_encap_init (void) install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_routes_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_encap_neighbor_advertised_routes_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd); -#endif - install_element (ENABLE_NODE, &show_bgp_ipv4_encap_cmd); install_element (ENABLE_NODE, &show_bgp_ipv4_encap_rd_cmd); @@ -976,7 +966,6 @@ bgp_encap_init (void) install_element (ENABLE_NODE, &show_bgp_ipv4_encap_neighbor_advertised_routes_cmd); install_element (ENABLE_NODE, &show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd); -#ifdef HAVE_IPV6 install_element (ENABLE_NODE, &show_bgp_ipv6_encap_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_encap_rd_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_encap_tags_cmd); @@ -985,7 +974,5 @@ bgp_encap_init (void) install_element (ENABLE_NODE, &show_bgp_ipv6_encap_rd_neighbor_routes_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_encap_neighbor_advertised_routes_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd); -#endif - } diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c index 9eaf3c26..73b93ceb 100644 --- a/bgpd/bgp_mpath.c +++ b/bgpd/bgp_mpath.c @@ -148,7 +148,6 @@ bgp_info_nexthop_cmp (struct bgp_info *bi1, struct bgp_info *bi2) compare = IPV4_ADDR_CMP (&ae1->mp_nexthop_global_in, &ae2->mp_nexthop_global_in); break; -#ifdef HAVE_IPV6 case 16: compare = IPV6_ADDR_CMP (&ae1->mp_nexthop_global, &ae2->mp_nexthop_global); @@ -160,7 +159,6 @@ bgp_info_nexthop_cmp (struct bgp_info *bi1, struct bgp_info *bi2) compare = IPV6_ADDR_CMP (&ae1->mp_nexthop_local, &ae2->mp_nexthop_local); break; -#endif /* HAVE_IPV6 */ } } @@ -746,10 +744,8 @@ bgp_info_mpath_aggregate_update (struct bgp_info *new_best, /* Zap multipath attr nexthop so we set nexthop to self */ attr.nexthop.s_addr = 0; -#ifdef HAVE_IPV6 if (attr.extra) memset (&attr.extra->mp_nexthop_global, 0, sizeof (struct in6_addr)); -#endif /* HAVE_IPV6 */ /* TODO: should we set ATOMIC_AGGREGATE and AGGREGATOR? */ diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 99e86b43..f8b43df8 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -599,7 +599,6 @@ DEFUN (show_bgp_ipv4_vpn, return bgp_show_mpls_vpn (vty, AFI_IP, NULL, bgp_show_type_normal, NULL, 0); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_vpn, show_bgp_ipv6_vpn_cmd, "show bgp ipv6 vpn", @@ -610,7 +609,6 @@ DEFUN (show_bgp_ipv6_vpn, { return bgp_show_mpls_vpn (vty, AFI_IP6, NULL, bgp_show_type_normal, NULL, 0); } -#endif DEFUN (show_bgp_ipv4_vpn_rd, show_bgp_ipv4_vpn_rd_cmd, @@ -758,7 +756,6 @@ DEFUN (show_bgp_ipv4_vpn_neighbor_routes, return bgp_show_mpls_vpn (vty, AFI_IP, NULL, bgp_show_type_neighbor, &su, 0); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_vpn_neighbor_routes, show_bgp_ipv6_vpn_neighbor_routes_cmd, "show bgp ipv6 vpn neighbors (A.B.C.D|X:X::X:X) routes", @@ -792,7 +789,6 @@ DEFUN (show_bgp_ipv6_vpn_neighbor_routes, return bgp_show_mpls_vpn (vty, AFI_IP6, NULL, bgp_show_type_neighbor, &su, 0); } -#endif DEFUN (show_bgp_ipv4_vpn_neighbor_advertised_routes, show_bgp_ipv4_vpn_neighbor_advertised_routes_cmd, @@ -1035,7 +1031,6 @@ bgp_mplsvpn_init (void) install_element (VIEW_NODE, &show_bgp_ipv4_vpn_rd_neighbor_advertised_routes_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_vpn_rd_neighbor_routes_cmd); -#ifdef HAVE_IPV6 install_element (VIEW_NODE, &show_bgp_ipv6_vpn_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_vpn_rd_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_vpn_tags_cmd); @@ -1044,7 +1039,6 @@ bgp_mplsvpn_init (void) install_element (VIEW_NODE, &show_bgp_ipv6_vpn_neighbor_advertised_routes_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_vpn_rd_neighbor_advertised_routes_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_vpn_rd_neighbor_routes_cmd); -#endif install_element (ENABLE_NODE, &show_bgp_ipv4_vpn_cmd); install_element (ENABLE_NODE, &show_bgp_ipv4_vpn_rd_cmd); @@ -1055,7 +1049,6 @@ bgp_mplsvpn_init (void) install_element (ENABLE_NODE, &show_bgp_ipv4_vpn_rd_neighbor_advertised_routes_cmd); install_element (ENABLE_NODE, &show_bgp_ipv4_vpn_rd_neighbor_routes_cmd); -#ifdef HAVE_IPV6 install_element (ENABLE_NODE, &show_bgp_ipv6_vpn_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_vpn_rd_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_vpn_tags_cmd); @@ -1064,5 +1057,4 @@ bgp_mplsvpn_init (void) install_element (ENABLE_NODE, &show_bgp_ipv6_vpn_neighbor_advertised_routes_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_vpn_rd_neighbor_advertised_routes_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_vpn_rd_neighbor_routes_cmd); -#endif } diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index d11cbc3e..7a227139 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -387,10 +387,8 @@ bgp_connect (struct peer *peer) zlog_err ("%s: could not raise privs", __func__); if (sockunion_family (&peer->su) == AF_INET) setsockopt_ipv4_tos (peer->fd, IPTOS_PREC_INTERNETCONTROL); -# ifdef HAVE_IPV6 else if (sockunion_family (&peer->su) == AF_INET6) setsockopt_ipv6_tclass (peer->fd, IPTOS_PREC_INTERNETCONTROL); -# endif if (bgpd_privs.change (ZPRIVS_LOWER)) zlog_err ("%s: could not lower privs", __func__); #endif @@ -404,10 +402,8 @@ bgp_connect (struct peer *peer) /* Update source bind. */ bgp_update_source (peer); -#ifdef HAVE_IPV6 if (peer->ifname) ifindex = ifname2ifindex (peer->ifname); -#endif /* HAVE_IPV6 */ if (BGP_DEBUG (events, EVENTS)) plog_debug (peer->log, "%s [Event] Connect start to %s fd %d", @@ -455,10 +451,8 @@ bgp_listener (int sock, struct sockaddr *sa, socklen_t salen) #ifdef IPTOS_PREC_INTERNETCONTROL if (sa->sa_family == AF_INET) setsockopt_ipv4_tos (sock, IPTOS_PREC_INTERNETCONTROL); -# ifdef HAVE_IPV6 else if (sa->sa_family == AF_INET6) setsockopt_ipv6_tclass (sock, IPTOS_PREC_INTERNETCONTROL); -# endif #endif sockopt_v6only (sa->sa_family, sock); @@ -491,7 +485,6 @@ bgp_listener (int sock, struct sockaddr *sa, socklen_t salen) } /* IPv6 supported version of BGP server socket setup. */ -#ifdef HAVE_IPV6 int bgp_socket (unsigned short port, const char *address) { @@ -548,50 +541,6 @@ bgp_socket (unsigned short port, const char *address) return 0; } -#else -/* Traditional IPv4 only version. */ -int -bgp_socket (unsigned short port, const char *address) -{ - int sock; - int socklen; - struct sockaddr_in sin; - int ret; - - sock = socket (AF_INET, SOCK_STREAM, 0); - if (sock < 0) - { - zlog_err ("socket: %s", safe_strerror (errno)); - return sock; - } - - /* if we intend to implement ttl-security, this socket needs ttl=255 */ - sockopt_ttl (AF_INET, sock, MAXTTL); - - memset (&sin, 0, sizeof (struct sockaddr_in)); - sin.sin_family = AF_INET; - sin.sin_port = htons (port); - socklen = sizeof (struct sockaddr_in); - - if (address && ((ret = inet_aton(address, &sin.sin_addr)) < 1)) - { - zlog_err("bgp_socket: could not parse ip address %s: %s", - address, safe_strerror (errno)); - return ret; - } -#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN - sin.sin_len = socklen; -#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ - - ret = bgp_listener (sock, (struct sockaddr *) &sin, socklen); - if (ret < 0) - { - close (sock); - return ret; - } - return sock; -} -#endif /* HAVE_IPV6 */ void bgp_close (void) 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 diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 1c2ebd6d..7b8b6577 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -1006,7 +1006,6 @@ bgp_open_capability (struct stream *s, struct peer *peer) stream_putc (s, 0); stream_putc (s, SAFI_ENCAP); } -#ifdef HAVE_IPV6 /* IPv6 unicast. */ if (peer->afc[AFI_IP6][SAFI_UNICAST]) { @@ -1055,7 +1054,6 @@ bgp_open_capability (struct stream *s, struct peer *peer) stream_putc (s, 0); stream_putc (s, SAFI_ENCAP); } -#endif /* HAVE_IPV6 */ /* Route refresh. */ SET_FLAG (peer->cap, PEER_CAP_REFRESH_ADV); diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 1d18779b..26e4d8ff 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -449,10 +449,8 @@ bgp_default_update_send (struct peer *peer, struct attr *attr, if (afi == AFI_IP) str2prefix ("0.0.0.0/0", &p); -#ifdef HAVE_IPV6 else str2prefix ("::/0", &p); -#endif /* HAVE_IPV6 */ /* Logging the attribute. */ if (BGP_DEBUG (update, UPDATE_OUT)) @@ -518,10 +516,8 @@ bgp_default_withdraw_send (struct peer *peer, afi_t afi, safi_t safi) if (afi == AFI_IP) str2prefix ("0.0.0.0/0", &p); -#ifdef HAVE_IPV6 else str2prefix ("::/0", &p); -#endif /* HAVE_IPV6 */ total_attr_len = 0; diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 93c613fa..0dcae61e 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -838,10 +838,8 @@ bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p, { if (p->family == AF_INET && p->u.prefix4.s_addr == INADDR_ANY) return 0; -#ifdef HAVE_IPV6 else if (p->family == AF_INET6 && p->prefixlen == 0) return 0; -#endif /* HAVE_IPV6 */ } /* Transparency check. */ @@ -985,31 +983,25 @@ bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p, (safi != SAFI_ENCAP && p->family == AF_INET) || \ (safi == SAFI_ENCAP && attr->extra->mp_nexthop_len == 4)) -#ifdef HAVE_IPV6 #define NEXTHOP_IS_V6 (\ (safi != SAFI_ENCAP && p->family == AF_INET6) || \ (safi == SAFI_ENCAP && attr->extra->mp_nexthop_len == 16)) -#endif /* next-hop-set */ if (transparent || (reflect && ! CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_NEXTHOP_SELF_ALL)) || (CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_NEXTHOP_UNCHANGED) && ((NEXTHOP_IS_V4 && attr->nexthop.s_addr) -#ifdef HAVE_IPV6 || (NEXTHOP_IS_V6 && ! IN6_IS_ADDR_UNSPECIFIED(&attr->extra->mp_nexthop_global)) -#endif /* HAVE_IPV6 */ ))) { /* NEXT-HOP Unchanged. */ } else if (CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_NEXTHOP_SELF) || (NEXTHOP_IS_V4 && attr->nexthop.s_addr == 0) -#ifdef HAVE_IPV6 || (NEXTHOP_IS_V6 && IN6_IS_ADDR_UNSPECIFIED(&attr->extra->mp_nexthop_global)) -#endif /* HAVE_IPV6 */ || (peer->sort == BGP_PEER_EBGP && bgp_multiaccess_check_v4 (attr->nexthop, peer->host) == 0)) { @@ -1022,7 +1014,6 @@ bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p, else memcpy (&attr->nexthop, &peer->nexthop.v4, IPV4_MAX_BYTELEN); } -#ifdef HAVE_IPV6 /* Set IPv6 nexthop. */ if (NEXTHOP_IS_V6) { @@ -1031,10 +1022,8 @@ bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p, IPV6_MAX_BYTELEN); attr->extra->mp_nexthop_len = 16; } -#endif /* HAVE_IPV6 */ } -#ifdef HAVE_IPV6 if (p->family == AF_INET6 && safi != SAFI_ENCAP) { /* Left nexthop_local unchanged if so configured. */ @@ -1073,7 +1062,6 @@ bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p, } } -#endif /* HAVE_IPV6 */ /* If this is EBGP peer and remove-private-AS is set. */ if (peer->sort == BGP_PEER_EBGP @@ -1154,10 +1142,8 @@ bgp_announce_check_rsclient (struct bgp_info *ri, struct peer *rsclient, { if (p->family == AF_INET && p->u.prefix4.s_addr == INADDR_ANY) return 0; -#ifdef HAVE_IPV6 else if (p->family == AF_INET6 && p->prefixlen == 0) return 0; -#endif /* HAVE_IPV6 */ } /* If the attribute has originator-id and it is same as remote @@ -1216,10 +1202,8 @@ bgp_announce_check_rsclient (struct bgp_info *ri, struct peer *rsclient, /* next-hop-set */ if ((p->family == AF_INET && attr->nexthop.s_addr == 0) -#ifdef HAVE_IPV6 || (p->family == AF_INET6 && IN6_IS_ADDR_UNSPECIFIED(&attr->extra->mp_nexthop_global)) -#endif /* HAVE_IPV6 */ ) { /* Set IPv4 nexthop. */ @@ -1231,7 +1215,6 @@ bgp_announce_check_rsclient (struct bgp_info *ri, struct peer *rsclient, else memcpy (&attr->nexthop, &rsclient->nexthop.v4, IPV4_MAX_BYTELEN); } -#ifdef HAVE_IPV6 /* Set IPv6 nexthop. */ if (p->family == AF_INET6) { @@ -1240,10 +1223,8 @@ bgp_announce_check_rsclient (struct bgp_info *ri, struct peer *rsclient, IPV6_MAX_BYTELEN); attr->extra->mp_nexthop_len = 16; } -#endif /* HAVE_IPV6 */ } -#ifdef HAVE_IPV6 if (p->family == AF_INET6) { struct attr_extra *attre = attr->extra; @@ -1285,8 +1266,6 @@ bgp_announce_check_rsclient (struct bgp_info *ri, struct peer *rsclient, } } -#endif /* HAVE_IPV6 */ - /* If this is EBGP peer and remove-private-AS is set. */ if (rsclient->sort == BGP_PEER_EBGP @@ -2581,7 +2560,6 @@ bgp_default_originate (struct peer *peer, afi_t afi, safi_t safi, int withdraw) if (afi == AFI_IP) str2prefix ("0.0.0.0/0", &p); -#ifdef HAVE_IPV6 else if (afi == AFI_IP6) { struct attr_extra *ae = attr.extra; @@ -2603,7 +2581,6 @@ bgp_default_originate (struct peer *peer, afi_t afi, safi_t safi, int withdraw) ae->mp_nexthop_len = 32; } } -#endif /* HAVE_IPV6 */ if (peer->default_rmap[afi][safi].name) { @@ -3309,7 +3286,6 @@ bgp_nlri_parse (struct peer *peer, struct attr *attr, struct bgp_nlri *packet) } } -#ifdef HAVE_IPV6 /* Check address. */ if (packet->afi == AFI_IP6 && packet->safi == SAFI_UNICAST) { @@ -3324,7 +3300,6 @@ bgp_nlri_parse (struct peer *peer, struct attr *attr, struct bgp_nlri *packet) continue; } } -#endif /* HAVE_IPV6 */ /* Normal process. */ if (attr) @@ -3978,14 +3953,12 @@ bgp_static_set (struct vty *vty, struct bgp *bgp, const char *ip_str, vty_out (vty, "%% Malformed prefix%s", VTY_NEWLINE); return CMD_WARNING; } -#ifdef HAVE_IPV6 if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&p.u.prefix6)) { vty_out (vty, "%% Malformed prefix (link-local address)%s", VTY_NEWLINE); return CMD_WARNING; } -#endif /* HAVE_IPV6 */ apply_mask (&p); @@ -4071,14 +4044,12 @@ bgp_static_unset (struct vty *vty, struct bgp *bgp, const char *ip_str, vty_out (vty, "%% Malformed prefix%s", VTY_NEWLINE); return CMD_WARNING; } -#ifdef HAVE_IPV6 if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&p.u.prefix6)) { vty_out (vty, "%% Malformed prefix (link-local address)%s", VTY_NEWLINE); return CMD_WARNING; } -#endif /* HAVE_IPV6 */ apply_mask (&p); @@ -4576,7 +4547,6 @@ ALIAS (no_bgp_network_mask_natural, "Network number\n" "Specify a BGP backdoor route\n") -#ifdef HAVE_IPV6 DEFUN (ipv6_bgp_network, ipv6_bgp_network_cmd, "network X:X::X:X/M", @@ -4634,7 +4604,6 @@ ALIAS (no_ipv6_bgp_network, BGP_STR "Specify a network to announce via BGP\n" "IPv6 prefix /, e.g., 3ffe::/16\n") -#endif /* HAVE_IPV6 */ /* stubs for removed AS-Pathlimit commands, kept for config compatibility */ ALIAS_DEPRECATED (bgp_network, @@ -4741,7 +4710,6 @@ ALIAS_DEPRECATED (no_bgp_network_mask_natural, "Specify a BGP backdoor route\n" "AS-Path hopcount limit attribute\n" "AS-Pathlimit TTL, in number of AS-Path hops\n") -#ifdef HAVE_IPV6 ALIAS_DEPRECATED (ipv6_bgp_network, ipv6_bgp_network_ttl_cmd, "network X:X::X:X/M pathlimit <0-255>", @@ -4757,7 +4725,6 @@ ALIAS_DEPRECATED (no_ipv6_bgp_network, "IPv6 prefix /\n" "AS-Path hopcount limit attribute\n" "AS-Pathlimit TTL, in number of AS-Path hops\n") -#endif /* HAVE_IPV6 */ /* Aggreagete address: @@ -5585,7 +5552,6 @@ ALIAS (no_aggregate_address_mask, "Filter more specific routes from updates\n" "Generate AS set path information\n") -#ifdef HAVE_IPV6 DEFUN (ipv6_aggregate_address, ipv6_aggregate_address_cmd, "aggregate-address X:X::X:X/M", @@ -5662,7 +5628,6 @@ ALIAS (no_ipv6_aggregate_address_summary_only, "Configure BGP aggregate entries\n" "Aggregate prefix\n" "Filter more specific routes from updates\n") -#endif /* HAVE_IPV6 */ /* Redistribute route treatment. */ void @@ -5686,14 +5651,12 @@ bgp_redistribute_add (struct prefix *p, const struct in_addr *nexthop, if (nexthop) attr.nexthop = *nexthop; -#ifdef HAVE_IPV6 if (nexthop6) { struct attr_extra *extra = bgp_attr_extra_get(&attr); extra->mp_nexthop_global = *nexthop6; extra->mp_nexthop_len = 16; } -#endif attr.med = metric; attr.flag |= ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC); @@ -5982,13 +5945,10 @@ route_vty_out( vty_out (vty, "%s", inet_ntop(af, &attr->extra->mp_nexthop_global_in, buf, BUFSIZ)); break; -#if HAVE_IPV6 case AF_INET6: vty_out (vty, "%s", inet_ntop(af, &attr->extra->mp_nexthop_global, buf, BUFSIZ)); break; -#endif - default: vty_out(vty, "?"); } @@ -6001,7 +5961,6 @@ route_vty_out( { vty_out (vty, "%-16s", inet_ntoa (attr->nexthop)); } -#ifdef HAVE_IPV6 else if (p->family == AF_INET6) { int len; @@ -6016,7 +5975,6 @@ route_vty_out( else vty_out (vty, "%*s", len, " "); } -#endif /* HAVE_IPV6 */ else { vty_out(vty, "?"); @@ -6074,7 +6032,6 @@ route_vty_out_tmp (struct vty *vty, struct prefix *p, else vty_out (vty, "%-16s", inet_ntoa (attr->nexthop)); } -#ifdef HAVE_IPV6 else if (p->family == AF_INET6) { int len; @@ -6091,7 +6048,6 @@ route_vty_out_tmp (struct vty *vty, struct prefix *p, else vty_out (vty, "%*s", len, " "); } -#endif /* HAVE_IPV6 */ if (attr->flag & ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC)) vty_out (vty, "%10u ", attr->med); @@ -6147,7 +6103,6 @@ route_vty_out_tag (struct vty *vty, struct prefix *p, else vty_out (vty, "%-16s", inet_ntoa (attr->nexthop)); } -#ifdef HAVE_IPV6 else if (p->family == AF_INET6) { assert (attr->extra); @@ -6165,7 +6120,6 @@ route_vty_out_tag (struct vty *vty, struct prefix *p, buf1, BUFSIZ)); } -#endif /* HAVE_IPV6 */ } label = decode_label (binfo->extra->tag); @@ -6328,7 +6282,6 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p, inet_ntoa (attr->extra->mp_nexthop_global_in) : inet_ntoa (attr->nexthop)); } -#ifdef HAVE_IPV6 else { assert (attr->extra); @@ -6336,7 +6289,6 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p, inet_ntop (AF_INET6, &attr->extra->mp_nexthop_global, buf, INET6_ADDRSTRLEN)); } -#endif /* HAVE_IPV6 */ if (binfo->peer == bgp->peer_self) { @@ -6362,7 +6314,6 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p, } vty_out (vty, "%s", VTY_NEWLINE); -#ifdef HAVE_IPV6 /* display nexthop local */ if (attr->extra && attr->extra->mp_nexthop_len == 32) { @@ -6371,7 +6322,6 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p, buf, INET6_ADDRSTRLEN), VTY_NEWLINE); } -#endif /* HAVE_IPV6 */ /* Line 3 display Origin, Med, Locpref, Weight, valid, Int/Ext/Local, Atomic, best */ vty_out (vty, " Origin %s", bgp_origin_long_str[attr->origin]); @@ -7247,7 +7197,6 @@ DEFUN (show_bgp_ipv4_vpn_route, return bgp_show_route (vty, NULL, argv[0], AFI_IP, SAFI_MPLS_VPN, NULL, 0); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_vpn_route, show_bgp_ipv6_vpn_route_cmd, "show bgp ipv6 vpn X:X::X:X", @@ -7259,7 +7208,6 @@ DEFUN (show_bgp_ipv6_vpn_route, { return bgp_show_route (vty, NULL, argv[0], AFI_IP6, SAFI_MPLS_VPN, NULL, 0); } -#endif DEFUN (show_bgp_ipv4_vpn_rd_route, show_bgp_ipv4_vpn_rd_route_cmd, @@ -7319,7 +7267,6 @@ DEFUN (show_bgp_ipv4_encap_route, return bgp_show_route (vty, NULL, argv[0], AFI_IP, SAFI_ENCAP, NULL, 0); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_encap_route, show_bgp_ipv6_encap_route_cmd, "show bgp ipv6 encap X:X::X:X", @@ -7331,7 +7278,6 @@ DEFUN (show_bgp_ipv6_encap_route, { return bgp_show_route (vty, NULL, argv[0], AFI_IP6, SAFI_ENCAP, NULL, 0); } -#endif DEFUN (show_bgp_ipv4_safi_rd_route, show_bgp_ipv4_safi_rd_route_cmd, @@ -7362,7 +7308,6 @@ DEFUN (show_bgp_ipv4_safi_rd_route, return bgp_show_route (vty, NULL, argv[2], AFI_IP, safi, &prd, 0); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_safi_rd_route, show_bgp_ipv6_safi_rd_route_cmd, "show bgp ipv6 (encap|vpn) rd ASN:nn_or_IP-address:nn X:X::X:X", @@ -7391,7 +7336,6 @@ DEFUN (show_bgp_ipv6_safi_rd_route, } return bgp_show_route (vty, NULL, argv[2], AFI_IP6, SAFI_ENCAP, &prd, 0); } -#endif DEFUN (show_bgp_ipv4_prefix, show_bgp_ipv4_prefix_cmd, @@ -7432,7 +7376,6 @@ DEFUN (show_bgp_ipv4_vpn_prefix, return bgp_show_route (vty, NULL, argv[0], AFI_IP, SAFI_MPLS_VPN, NULL, 1); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_vpn_prefix, show_bgp_ipv6_vpn_prefix_cmd, "show bgp ipv6 vpn X:X::X:X/M", @@ -7444,7 +7387,6 @@ DEFUN (show_bgp_ipv6_vpn_prefix, { return bgp_show_route (vty, NULL, argv[0], AFI_IP6, SAFI_MPLS_VPN, NULL, 1); } -#endif DEFUN (show_bgp_ipv4_encap_prefix, show_bgp_ipv4_encap_prefix_cmd, @@ -7459,7 +7401,6 @@ DEFUN (show_bgp_ipv4_encap_prefix, return bgp_show_route (vty, NULL, argv[0], AFI_IP, SAFI_ENCAP, NULL, 1); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_encap_prefix, show_bgp_ipv6_encap_prefix_cmd, "show bgp ipv6 encap X:X::X:X/M", @@ -7472,7 +7413,6 @@ DEFUN (show_bgp_ipv6_encap_prefix, { return bgp_show_route (vty, NULL, argv[0], AFI_IP6, SAFI_ENCAP, NULL, 1); } -#endif DEFUN (show_bgp_ipv4_safi_rd_prefix, show_bgp_ipv4_safi_rd_prefix_cmd, @@ -7504,7 +7444,6 @@ DEFUN (show_bgp_ipv4_safi_rd_prefix, return bgp_show_route (vty, NULL, argv[2], AFI_IP, safi, &prd, 1); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_safi_rd_prefix, show_bgp_ipv6_safi_rd_prefix_cmd, "show bgp ipv6 (encap|vpn) rd ASN:nn_or_IP-address:nn X:X::X:X/M", @@ -7534,7 +7473,6 @@ DEFUN (show_bgp_ipv6_safi_rd_prefix, } return bgp_show_route (vty, NULL, argv[2], AFI_IP6, safi, &prd, 1); } -#endif DEFUN (show_bgp_afi_safi_view, show_bgp_afi_safi_view_cmd, @@ -7652,7 +7590,6 @@ DEFUN (show_bgp_afi, NULL); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_safi, show_bgp_ipv6_safi_cmd, "show bgp ipv6 (unicast|multicast)", @@ -7887,9 +7824,6 @@ DEFUN (show_bgp_view_ipv6_prefix, return bgp_show_route (vty, argv[0], argv[1], AFI_IP6, SAFI_UNICAST, NULL, 1); } -#endif - - static int bgp_show_regexp (struct vty *vty, int argc, const char **argv, afi_t afi, safi_t safi, enum bgp_show_type type) @@ -7994,7 +7928,6 @@ DEFUN (show_ip_bgp_ipv4_regexp, bgp_show_type_regexp); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_regexp, show_bgp_regexp_cmd, "show bgp regexp .LINE", @@ -8034,7 +7967,6 @@ DEFUN (show_ipv6_mbgp_regexp, return bgp_show_regexp (vty, argc, argv, AFI_IP6, SAFI_MULTICAST, bgp_show_type_regexp); } -#endif /* HAVE_IPV6 */ DEFUN (show_bgp_ipv4_safi_flap_regexp, show_bgp_ipv4_safi_flap_regexp_cmd, @@ -8075,7 +8007,6 @@ ALIAS (show_bgp_ipv4_safi_flap_regexp, "Display routes matching the AS path regular expression\n" "A regular-expression to match the BGP AS paths\n") -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_safi_flap_regexp, show_bgp_ipv6_safi_flap_regexp_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) flap-statistics regexp .LINE", @@ -8114,7 +8045,6 @@ ALIAS (show_bgp_ipv6_safi_flap_regexp, "Display flap statistics of routes\n" "Display routes matching the AS path regular expression\n" "A regular-expression to match the BGP AS paths\n") -#endif DEFUN (show_bgp_ipv4_safi_regexp, show_bgp_ipv4_safi_regexp_cmd, @@ -8138,7 +8068,7 @@ DEFUN (show_bgp_ipv4_safi_regexp, return bgp_show_regexp (vty, argc-1, argv+1, AFI_IP, safi, bgp_show_type_regexp); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_regexp, show_bgp_ipv6_safi_regexp_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) regexp .LINE", @@ -8175,8 +8105,6 @@ DEFUN (show_bgp_ipv6_regexp, bgp_show_type_regexp); } -#endif /* HAVE_IPV6 */ - static int bgp_show_prefix_list (struct vty *vty, const char *prefix_list_str, afi_t afi, safi_t safi, enum bgp_show_type type) @@ -8251,7 +8179,6 @@ DEFUN (show_ip_bgp_ipv4_prefix_list, bgp_show_type_prefix_list); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_prefix_list, show_bgp_prefix_list_cmd, "show bgp prefix-list WORD", @@ -8300,7 +8227,6 @@ DEFUN (show_ipv6_mbgp_prefix_list, return bgp_show_prefix_list (vty, argv[0], AFI_IP6, SAFI_MULTICAST, bgp_show_type_prefix_list); } -#endif /* HAVE_IPV6 */ DEFUN (show_bgp_ipv4_prefix_list, show_bgp_ipv4_prefix_list_cmd, @@ -8353,7 +8279,6 @@ ALIAS (show_bgp_ipv4_safi_flap_prefix_list, "Display routes conforming to the prefix-list\n" "IP prefix-list name\n") -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_safi_flap_prefix_list, show_bgp_ipv6_safi_flap_prefix_list_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) flap-statistics prefix-list WORD", @@ -8390,7 +8315,6 @@ ALIAS (show_bgp_ipv6_safi_flap_prefix_list, "Display flap statistics of routes\n" "Display routes conforming to the prefix-list\n" "IP prefix-list name\n") -#endif DEFUN (show_bgp_ipv4_safi_prefix_list, show_bgp_ipv4_safi_prefix_list_cmd, @@ -8413,7 +8337,7 @@ DEFUN (show_bgp_ipv4_safi_prefix_list, return bgp_show_prefix_list (vty, argv[1], AFI_IP, safi, bgp_show_type_prefix_list); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_prefix_list, show_bgp_ipv6_safi_prefix_list_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) prefix-list WORD", @@ -8436,8 +8360,6 @@ DEFUN (show_bgp_ipv6_safi_prefix_list, bgp_show_type_prefix_list); } -#endif /* HAVE_IPV6 */ - static int bgp_show_filter_list (struct vty *vty, const char *filter, afi_t afi, safi_t safi, enum bgp_show_type type) @@ -8512,7 +8434,6 @@ DEFUN (show_ip_bgp_ipv4_filter_list, bgp_show_type_filter_list); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_filter_list, show_bgp_filter_list_cmd, "show bgp filter-list WORD", @@ -8552,7 +8473,6 @@ DEFUN (show_ipv6_mbgp_filter_list, return bgp_show_filter_list (vty, argv[0], AFI_IP6, SAFI_MULTICAST, bgp_show_type_filter_list); } -#endif /* HAVE_IPV6 */ DEFUN (show_ip_bgp_dampening_info, show_ip_bgp_dampening_params_cmd, @@ -8618,7 +8538,6 @@ ALIAS (show_bgp_ipv4_safi_flap_filter_list, "Display routes conforming to the filter-list\n" "Regular expression access list name\n") -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_safi_flap_filter_list, show_bgp_ipv6_safi_flap_filter_list_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) flap-statistics filter-list WORD", @@ -8656,7 +8575,6 @@ ALIAS (show_bgp_ipv6_safi_flap_filter_list, "Display flap statistics of routes\n" "Display routes conforming to the filter-list\n" "Regular expression access list name\n") -#endif DEFUN (show_bgp_ipv4_safi_filter_list, show_bgp_ipv4_safi_filter_list_cmd, @@ -8679,7 +8597,7 @@ DEFUN (show_bgp_ipv4_safi_filter_list, return bgp_show_filter_list (vty, argv[1], AFI_IP, safi, bgp_show_type_filter_list); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_filter_list, show_bgp_ipv6_safi_filter_list_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) filter-list WORD", @@ -8715,8 +8633,6 @@ DEFUN (show_bgp_ipv6_filter_list, bgp_show_type_filter_list); } -#endif /* HAVE_IPV6 */ - static int bgp_show_route_map (struct vty *vty, const char *rmap_str, afi_t afi, safi_t safi, enum bgp_show_type type) @@ -8889,7 +8805,6 @@ DEFUN (show_ip_bgp_ipv4_community_all, bgp_show_type_community_all, NULL); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_community_all, show_bgp_community_all_cmd, "show bgp community", @@ -8934,7 +8849,6 @@ DEFUN (show_ipv6_mbgp_community_all, return bgp_show (vty, NULL, AFI_IP6, SAFI_MULTICAST, bgp_show_type_community_all, NULL); } -#endif /* HAVE_IPV6 */ DEFUN (show_bgp_ipv4_route_map, show_bgp_ipv4_route_map_cmd, @@ -8986,7 +8900,7 @@ ALIAS (show_bgp_ipv4_safi_flap_route_map, "Display flap statistics of routes\n" "Display routes matching the route-map\n" "A route-map to match on\n") -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_flap_route_map, show_bgp_ipv6_safi_flap_route_map_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) flap-statistics route-map WORD", @@ -9023,7 +8937,6 @@ ALIAS (show_bgp_ipv6_safi_flap_route_map, "Display flap statistics of routes\n" "Display routes matching the route-map\n" "A route-map to match on\n") -#endif DEFUN (show_bgp_ipv4_safi_route_map, show_bgp_ipv4_safi_route_map_cmd, @@ -9046,7 +8959,7 @@ DEFUN (show_bgp_ipv4_safi_route_map, return bgp_show_route_map (vty, argv[1], AFI_IP, safi, bgp_show_type_route_map); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_route_map, show_bgp_ipv6_safi_route_map_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) route-map WORD", @@ -9081,7 +8994,6 @@ DEFUN (show_bgp_ipv6_route_map, return bgp_show_route_map (vty, argv[0], AFI_IP6, SAFI_UNICAST, bgp_show_type_route_map); } -#endif DEFUN (show_bgp_ipv4_cidr_only, show_bgp_ipv4_cidr_only_cmd, @@ -9152,17 +9064,11 @@ DEFUN (show_bgp_ipv4_safi_cidr_only, /* new046 */ DEFUN (show_bgp_afi_safi_community_all, show_bgp_afi_safi_community_all_cmd, -#ifdef HAVE_IPV6 "show bgp (ipv4|ipv6) (encap|multicast|unicast|vpn) community", -#else - "show bgp ipv4 (encap|multicast|unicast|vpn) community", -#endif SHOW_STR BGP_STR "Address family\n" -#ifdef HAVE_IPV6 "Address family\n" -#endif "Address Family modifier\n" "Address Family modifier\n" "Address Family modifier\n" @@ -9185,17 +9091,11 @@ DEFUN (show_bgp_afi_safi_community_all, } DEFUN (show_bgp_afi_community_all, show_bgp_afi_community_all_cmd, -#ifdef HAVE_IPV6 "show bgp (ipv4|ipv6) community", -#else - "show bgp ipv4 community", -#endif SHOW_STR BGP_STR "Address family\n" -#ifdef HAVE_IPV6 "Address family\n" -#endif "Display routes matching the communities\n") { afi_t afi; @@ -9609,7 +9509,6 @@ ALIAS (show_ip_bgp_ipv4_community_exact, "Do not export to next AS (well-known community)\n" "Exact match of the communities") -#ifdef HAVE_IPV6 DEFUN (show_bgp_community, show_bgp_community_cmd, "show bgp community (AA:NN|local-AS|no-advertise|no-export)", @@ -10227,7 +10126,6 @@ ALIAS (show_ipv6_mbgp_community_exact, "Do not advertise to any peer (well-known community)\n" "Do not export to next AS (well-known community)\n" "Exact match of the communities") -#endif /* HAVE_IPV6 */ DEFUN (show_bgp_ipv4_community, show_bgp_ipv4_community_cmd, @@ -10392,19 +10290,13 @@ ALIAS (show_bgp_ipv4_safi_community, DEFUN (show_bgp_view_afi_safi_community_all, show_bgp_view_afi_safi_community_all_cmd, -#ifdef HAVE_IPV6 "show bgp view WORD (ipv4|ipv6) (unicast|multicast) community", -#else - "show bgp view WORD ipv4 (unicast|multicast) community", -#endif SHOW_STR BGP_STR "BGP view\n" "View name\n" "Address family\n" -#ifdef HAVE_IPV6 "Address family\n" -#endif "Address Family modifier\n" "Address Family modifier\n" "Display routes matching the communities\n") @@ -10421,31 +10313,20 @@ DEFUN (show_bgp_view_afi_safi_community_all, return CMD_WARNING; } -#ifdef HAVE_IPV6 afi = (strncmp (argv[1], "ipv6", 4) == 0) ? AFI_IP6 : AFI_IP; safi = (strncmp (argv[2], "m", 1) == 0) ? SAFI_MULTICAST : SAFI_UNICAST; -#else - afi = AFI_IP; - safi = (strncmp (argv[1], "m", 1) == 0) ? SAFI_MULTICAST : SAFI_UNICAST; -#endif return bgp_show (vty, bgp, afi, safi, bgp_show_type_community_all, NULL); } DEFUN (show_bgp_view_afi_safi_community, show_bgp_view_afi_safi_community_cmd, -#ifdef HAVE_IPV6 "show bgp view WORD (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export)", -#else - "show bgp view WORD ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export)", -#endif SHOW_STR BGP_STR "BGP view\n" "View name\n" "Address family\n" -#ifdef HAVE_IPV6 "Address family\n" -#endif "Address family modifier\n" "Address family modifier\n" "Display routes matching the communities\n" @@ -10457,32 +10338,20 @@ DEFUN (show_bgp_view_afi_safi_community, int afi; int safi; -#ifdef HAVE_IPV6 afi = (strncmp (argv[1], "ipv6", 4) == 0) ? AFI_IP6 : AFI_IP; safi = (strncmp (argv[2], "m", 1) == 0) ? SAFI_MULTICAST : SAFI_UNICAST; return bgp_show_community (vty, argv[0], argc-3, &argv[3], 0, afi, safi); -#else - afi = AFI_IP; - safi = (strncmp (argv[1], "m", 1) == 0) ? SAFI_MULTICAST : SAFI_UNICAST; - return bgp_show_community (vty, argv[0], argc-2, &argv[2], 0, afi, safi); -#endif } ALIAS (show_bgp_view_afi_safi_community, show_bgp_view_afi_safi_community2_cmd, -#ifdef HAVE_IPV6 "show bgp view WORD (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", -#else - "show bgp view WORD ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", -#endif SHOW_STR BGP_STR "BGP view\n" "View name\n" "Address family\n" -#ifdef HAVE_IPV6 "Address family\n" -#endif "Address family modifier\n" "Address family modifier\n" "Display routes matching the communities\n" @@ -10497,19 +10366,13 @@ ALIAS (show_bgp_view_afi_safi_community, ALIAS (show_bgp_view_afi_safi_community, show_bgp_view_afi_safi_community3_cmd, -#ifdef HAVE_IPV6 "show bgp view WORD (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", -#else - "show bgp view WORD ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", -#endif SHOW_STR BGP_STR "BGP view\n" "View name\n" "Address family\n" -#ifdef HAVE_IPV6 "Address family\n" -#endif "Address family modifier\n" "Address family modifier\n" "Display routes matching the communities\n" @@ -10528,19 +10391,13 @@ ALIAS (show_bgp_view_afi_safi_community, ALIAS (show_bgp_view_afi_safi_community, show_bgp_view_afi_safi_community4_cmd, -#ifdef HAVE_IPV6 "show bgp view WORD (ipv4|ipv6) (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", -#else - "show bgp view WORD ipv4 (unicast|multicast) community (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export) (AA:NN|local-AS|no-advertise|no-export)", -#endif SHOW_STR BGP_STR "BGP view\n" "View name\n" "Address family\n" -#ifdef HAVE_IPV6 "Address family\n" -#endif "Address family modifier\n" "Address family modifier\n" "Display routes matching the communities\n" @@ -10730,8 +10587,6 @@ ALIAS (show_bgp_ipv4_safi_community4_exact, "Do not export to next AS (well-known community)\n" "Exact match of the communities") - -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_safi_community, show_bgp_ipv6_safi_community_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) community (AA:NN|local-AS|no-advertise|no-export)", @@ -10932,8 +10787,6 @@ ALIAS (show_bgp_community_exact, "Do not export to next AS (well-known community)\n" "Exact match of the communities") -#endif /* HAVE_IPV6 */ - static int bgp_show_community_list (struct vty *vty, const char *com, int exact, afi_t afi, safi_t safi) @@ -11019,7 +10872,6 @@ DEFUN (show_ip_bgp_ipv4_community_list_exact, return bgp_show_community_list (vty, argv[1], 1, AFI_IP, SAFI_UNICAST); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_community_list, show_bgp_community_list_cmd, "show bgp community-list (<1-500>|WORD)", @@ -11119,7 +10971,6 @@ DEFUN (show_ipv6_mbgp_community_list_exact, { return bgp_show_community_list (vty, argv[0], 1, AFI_IP6, SAFI_MULTICAST); } -#endif /* HAVE_IPV6 */ DEFUN (show_bgp_ipv4_community_list, show_bgp_ipv4_community_list_cmd, @@ -11185,7 +11036,6 @@ DEFUN (show_bgp_ipv4_safi_community_list_exact, return bgp_show_community_list (vty, argv[1], 1, AFI_IP, SAFI_UNICAST); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_safi_community_list, show_bgp_ipv6_safi_community_list_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) community-list (<1-500>|WORD)", @@ -11232,7 +11082,6 @@ DEFUN (show_bgp_ipv6_safi_community_list_exact, } return bgp_show_community_list (vty, argv[1], 1, AFI_IP6, safi); } -#endif /* HAVE_IPV6 */ static int bgp_show_prefix_longer (struct vty *vty, const char *prefix, afi_t afi, @@ -11359,7 +11208,6 @@ ALIAS (show_ip_bgp_flap_prefix, "Display flap statistics of routes\n" "IP prefix /, e.g., 35.0.0.0/8\n") -#ifdef HAVE_IPV6 DEFUN (show_bgp_prefix_longer, show_bgp_prefix_longer_cmd, "show bgp X:X::X:X/M longer-prefixes", @@ -11399,7 +11247,6 @@ DEFUN (show_ipv6_mbgp_prefix_longer, return bgp_show_prefix_longer (vty, argv[0], AFI_IP6, SAFI_MULTICAST, bgp_show_type_prefix_longer); } -#endif /* HAVE_IPV6 */ DEFUN (show_bgp_ipv4_prefix_longer, show_bgp_ipv4_prefix_longer_cmd, @@ -11453,7 +11300,6 @@ ALIAS (show_bgp_ipv4_safi_flap_prefix_longer, "IP prefix /, e.g., 35.0.0.0/8\n" "Display route and more specific routes\n") -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_safi_flap_prefix_longer, show_bgp_ipv6_safi_flap_prefix_longer_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) flap-statistics X:X::X:X/M longer-prefixes", @@ -11491,7 +11337,6 @@ ALIAS (show_bgp_ipv6_safi_flap_prefix_longer, "Display flap statistics of routes\n" "IP prefix /, e.g., 35.0.0.0/8\n" "Display route and more specific routes\n") -#endif DEFUN (show_bgp_ipv4_safi_prefix_longer, show_bgp_ipv4_safi_prefix_longer_cmd, @@ -11517,7 +11362,6 @@ DEFUN (show_bgp_ipv4_safi_prefix_longer, bgp_show_type_prefix_longer); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_safi_prefix_longer, show_bgp_ipv6_safi_prefix_longer_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) X:X::X:X/M longer-prefixes", @@ -11541,7 +11385,6 @@ DEFUN (show_bgp_ipv6_safi_prefix_longer, return bgp_show_prefix_longer (vty, argv[1], AFI_IP6, safi, bgp_show_type_prefix_longer); } -#endif DEFUN (show_bgp_ipv4_safi_flap_address, show_bgp_ipv4_safi_flap_address_cmd, @@ -11578,7 +11421,7 @@ ALIAS (show_bgp_ipv4_safi_flap_address, "Display detailed information about dampening\n" "Display flap statistics of routes\n" "Network in the BGP routing table to display\n") -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_flap_address, show_bgp_ipv6_flap_address_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) flap-statistics A.B.C.D", @@ -11614,7 +11457,6 @@ ALIAS (show_bgp_ipv6_flap_address, "Display detailed information about dampening\n" "Display flap statistics of routes\n" "Network in the BGP routing table to display\n") -#endif DEFUN (show_bgp_ipv4_safi_flap_prefix, show_bgp_ipv4_safi_flap_prefix_cmd, @@ -11653,7 +11495,6 @@ ALIAS (show_bgp_ipv4_safi_flap_prefix, "Display flap statistics of routes\n" "IP prefix /, e.g., 35.0.0.0/8\n") -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_safi_flap_prefix, show_bgp_ipv6_safi_flap_prefix_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) flap-statistics X:X::X:X/M", @@ -11704,8 +11545,6 @@ DEFUN (show_bgp_ipv6_prefix_longer, bgp_show_type_prefix_longer); } -#endif /* HAVE_IPV6 */ - static struct peer * peer_lookup_in_view (struct vty *vty, const char *view_name, const char *ip_str) @@ -12375,7 +12214,7 @@ DEFUN (show_bgp_ipv4_safi_neighbor_prefix_counts, return bgp_peer_counts (vty, peer, AFI_IP, safi); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_neighbor_prefix_counts, show_bgp_ipv6_safi_neighbor_prefix_counts_cmd, "show bgp ipv6 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X) prefix-counts", @@ -12405,7 +12244,6 @@ DEFUN (show_bgp_ipv6_safi_neighbor_prefix_counts, return bgp_peer_counts (vty, peer, AFI_IP6, safi); } -#endif DEFUN (show_ip_bgp_encap_neighbor_prefix_counts, show_ip_bgp_encap_neighbor_prefix_counts_cmd, @@ -12604,7 +12442,6 @@ DEFUN (show_ip_bgp_ipv4_neighbor_advertised_route, return peer_adj_routes (vty, peer, AFI_IP, SAFI_UNICAST, 0); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_view_neighbor_advertised_route, show_bgp_view_neighbor_advertised_route_cmd, "show bgp view WORD neighbors (A.B.C.D|X:X::X:X) advertised-routes", @@ -12708,7 +12545,6 @@ DEFUN (ipv6_mbgp_neighbor_advertised_route, return peer_adj_routes (vty, peer, AFI_IP6, SAFI_MULTICAST, 0); } -#endif /* HAVE_IPV6 */ DEFUN (show_ip_bgp_view_neighbor_received_routes, show_ip_bgp_view_neighbor_received_routes_cmd, @@ -12931,7 +12767,7 @@ DEFUN (show_bgp_ipv4_safi_neighbor_advertised_route, return peer_adj_routes (vty, peer, AFI_IP, safi, 0); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_neighbor_advertised_route, show_bgp_ipv6_safi_neighbor_advertised_route_cmd, "show bgp ipv6 (multicast|unicast) neighbors (A.B.C.D|X:X::X:X) advertised-routes", @@ -13011,8 +12847,6 @@ DEFUN (show_bgp_view_ipv6_neighbor_received_routes, return peer_adj_routes (vty, peer, AFI_IP6, SAFI_UNICAST, 1); } -#endif /* HAVE_IPV6 */ - DEFUN (show_bgp_ipv4_safi_neighbor_received_routes, show_bgp_ipv4_safi_neighbor_received_routes_cmd, @@ -13043,7 +12877,7 @@ DEFUN (show_bgp_ipv4_safi_neighbor_received_routes, return peer_adj_routes (vty, peer, AFI_IP, safi, 1); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_neighbor_received_routes, show_bgp_ipv6_safi_neighbor_received_routes_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) neighbors (A.B.C.D|X:X::X:X) received-routes", @@ -13073,7 +12907,6 @@ DEFUN (show_bgp_ipv6_safi_neighbor_received_routes, return peer_adj_routes (vty, peer, AFI_IP6, safi, 1); } -#endif DEFUN (show_bgp_view_afi_safi_neighbor_adv_recd_routes, show_bgp_view_afi_safi_neighbor_adv_recd_routes_cmd, @@ -13260,7 +13093,7 @@ DEFUN (show_bgp_ipv4_safi_neighbor_received_prefix_filter, return CMD_SUCCESS; } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_neighbor_received_prefix_filter, show_bgp_ipv6_safi_neighbor_received_prefix_filter_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) neighbors (A.B.C.D|X:X::X:X) received prefix-filter", @@ -13397,7 +13230,6 @@ DEFUN (show_bgp_view_ipv6_neighbor_received_prefix_filter, return CMD_SUCCESS; } -#endif /* HAVE_IPV6 */ static int bgp_show_neighbor_route (struct vty *vty, struct peer *peer, afi_t afi, @@ -13714,7 +13546,7 @@ DEFUN (show_bgp_ipv4_safi_neighbor_flap, return bgp_show_neighbor_route (vty, peer, AFI_IP, safi, bgp_show_type_flap_neighbor); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_neighbor_flap, show_bgp_ipv6_safi_neighbor_flap_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) neighbors (A.B.C.D|X:X::X:X) flap-statistics", @@ -13744,7 +13576,6 @@ DEFUN (show_bgp_ipv6_safi_neighbor_flap, return bgp_show_neighbor_route (vty, peer, AFI_IP6, safi, bgp_show_type_flap_neighbor); } -#endif DEFUN (show_bgp_ipv4_safi_neighbor_damp, show_bgp_ipv4_safi_neighbor_damp_cmd, @@ -13775,7 +13606,7 @@ DEFUN (show_bgp_ipv4_safi_neighbor_damp, return bgp_show_neighbor_route (vty, peer, AFI_IP, safi, bgp_show_type_damp_neighbor); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_neighbor_damp, show_bgp_ipv6_safi_neighbor_damp_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) neighbors (A.B.C.D|X:X::X:X) dampened-routes", @@ -13805,7 +13636,6 @@ DEFUN (show_bgp_ipv6_safi_neighbor_damp, return bgp_show_neighbor_route (vty, peer, AFI_IP6, safi, bgp_show_type_damp_neighbor); } -#endif DEFUN (show_bgp_ipv4_safi_neighbor_routes, show_bgp_ipv4_safi_neighbor_routes_cmd, @@ -13835,7 +13665,7 @@ DEFUN (show_bgp_ipv4_safi_neighbor_routes, return bgp_show_neighbor_route (vty, peer, AFI_IP, safi, bgp_show_type_neighbor); } -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_neighbor_routes, show_bgp_ipv6_safi_neighbor_routes_cmd, "show bgp ipv6 (multicast|unicast) neighbors (A.B.C.D|X:X::X:X) routes", @@ -13864,7 +13694,6 @@ DEFUN (show_bgp_ipv6_safi_neighbor_routes, return bgp_show_neighbor_route (vty, peer, AFI_IP6, safi, bgp_show_type_neighbor); } -#endif DEFUN (show_bgp_view_ipv4_safi_rsclient_route, show_bgp_view_ipv4_safi_rsclient_route_cmd, @@ -14102,7 +13931,6 @@ ALIAS (show_bgp_view_ipv4_safi_rsclient_prefix, NEIGHBOR_ADDR_STR "IP prefix /, e.g., 35.0.0.0/8\n") -#ifdef HAVE_IPV6 DEFUN (show_bgp_view_ipv6_neighbor_routes, show_bgp_view_ipv6_neighbor_routes_cmd, "show bgp view WORD ipv6 neighbors (A.B.C.D|X:X::X:X) routes", @@ -14359,8 +14187,6 @@ ALIAS (show_bgp_view_neighbor_damp, "Neighbor to display information about\n" "Display the dampened routes received from neighbor\n") -#endif /* HAVE_IPV6 */ - DEFUN (show_bgp_view_rsclient, show_bgp_view_rsclient_cmd, "show bgp view WORD rsclient (A.B.C.D|X:X::X:X)", @@ -14502,7 +14328,6 @@ ALIAS (show_bgp_view_ipv4_rsclient, "Information about Route Server Client\n" NEIGHBOR_ADDR_STR2) -#ifdef HAVE_IPV6 ALIAS (show_bgp_view_ipv6_rsclient, show_bgp_ipv6_rsclient_cmd, "show bgp ipv6 rsclient (A.B.C.D|X:X::X:X)", @@ -15021,8 +14846,6 @@ ALIAS (show_bgp_view_ipv6_safi_rsclient_prefix, NEIGHBOR_ADDR_STR "IP prefix /, e.g., 3ffe::/16\n") -#endif /* HAVE_IPV6 */ - struct bgp_table *bgp_distance_table; struct bgp_distance @@ -15460,7 +15283,7 @@ ALIAS (show_bgp_ipv4_safi_dampened_paths, "Address Family modifier\n" "Display detailed information about dampening\n" "Display paths suppressed due to dampening\n") -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_dampened_paths, show_bgp_ipv6_safi_dampened_paths_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) dampened-paths", @@ -15494,7 +15317,6 @@ ALIAS (show_bgp_ipv6_safi_dampened_paths, "Address Family modifier\n" "Display detailed information about dampening\n" "Display paths suppressed due to dampening\n") -#endif DEFUN (show_bgp_ipv4_safi_flap_statistics, show_bgp_ipv4_safi_flap_statistics_cmd, @@ -15529,7 +15351,7 @@ ALIAS (show_bgp_ipv4_safi_flap_statistics, "Address Family modifier\n" "Display detailed information about dampening\n" "Display flap statistics of routes\n") -#ifdef HAVE_IPV6 + DEFUN (show_bgp_ipv6_safi_flap_statistics, show_bgp_ipv6_safi_flap_statistics_cmd, "show bgp ipv6 (encap|multicast|unicast|vpn) flap-statistics", @@ -15563,7 +15385,6 @@ ALIAS (show_bgp_ipv6_safi_flap_statistics, "Address Family modifier\n" "Display detailed information about dampening\n" "Display flap statistics of routes\n") -#endif /* Display specified route of BGP table. */ static int @@ -16300,7 +16121,6 @@ bgp_route_init (void) /* prefix count */ install_element (ENABLE_NODE, &show_bgp_ipv4_safi_neighbor_prefix_counts_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_safi_neighbor_prefix_counts_cmd); -#ifdef HAVE_IPV6 install_element (ENABLE_NODE, &show_bgp_ipv6_neighbor_prefix_counts_cmd); /* New config IPv6 BGP commands. */ @@ -16455,7 +16275,6 @@ bgp_route_init (void) /* Statistics */ install_element (ENABLE_NODE, &show_bgp_statistics_cmd); install_element (ENABLE_NODE, &show_bgp_statistics_view_cmd); -#endif /* HAVE_IPV6 */ install_element (BGP_NODE, &bgp_distance_cmd); install_element (BGP_NODE, &no_bgp_distance_cmd); @@ -16519,10 +16338,8 @@ bgp_route_init (void) install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_backdoor_ttl_cmd); install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_natural_backdoor_ttl_cmd); -#ifdef HAVE_IPV6 install_element (BGP_IPV6_NODE, &ipv6_bgp_network_ttl_cmd); install_element (BGP_IPV6_NODE, &no_ipv6_bgp_network_ttl_cmd); -#endif /* old style commands */ install_element (VIEW_NODE, &show_ip_bgp_cmd); diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index a6d5a0e1..39fa08c8 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -1710,7 +1710,6 @@ struct route_map_rule_cmd route_set_aggregator_as_cmd = route_set_aggregator_as_free, }; -#ifdef HAVE_IPV6 /* `match ipv6 address IP_ACCESS_LIST' */ static route_map_result_t @@ -2071,8 +2070,6 @@ struct route_map_rule_cmd route_set_ipv6_nexthop_peer_cmd = route_set_ipv6_nexthop_peer_free }; -#endif /* HAVE_IPV6 */ - /* `set vpnv4 nexthop A.B.C.D' */ static route_map_result_t @@ -3568,8 +3565,6 @@ ALIAS (no_set_aggregator_as, "AS number\n" "IP address of aggregator\n") - -#ifdef HAVE_IPV6 DEFUN (match_ipv6_address, match_ipv6_address_cmd, "match ipv6 address WORD", @@ -3737,7 +3732,6 @@ ALIAS (no_set_ipv6_nexthop_local, "IPv6 next-hop address\n" "IPv6 local address\n" "IPv6 address of next hop\n") -#endif /* HAVE_IPV6 */ DEFUN (set_vpnv4_nexthop, set_vpnv4_nexthop_cmd, @@ -3998,7 +3992,6 @@ bgp_route_map_init (void) install_element (RMAP_NODE, &no_set_originator_id_cmd); install_element (RMAP_NODE, &no_set_originator_id_val_cmd); -#ifdef HAVE_IPV6 route_map_install_match (&route_match_ipv6_address_cmd); route_map_install_match (&route_match_ipv6_next_hop_cmd); route_map_install_match (&route_match_ipv6_address_prefix_list_cmd); @@ -4020,7 +4013,6 @@ bgp_route_map_init (void) install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_val_cmd); install_element (RMAP_NODE, &set_ipv6_nexthop_peer_cmd); install_element (RMAP_NODE, &no_set_ipv6_nexthop_peer_cmd); -#endif /* HAVE_IPV6 */ /* AS-Pathlimit: functionality removed, commands kept for * compatibility. diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h index 209a18c9..bee12963 100644 --- a/bgpd/bgp_table.h +++ b/bgpd/bgp_table.h @@ -265,8 +265,6 @@ bgp_node_match_ipv4 (const struct bgp_table *table, struct in_addr *addr) addr)); } -#ifdef HAVE_IPV6 - /* * bgp_node_match_ipv6 */ @@ -277,8 +275,6 @@ bgp_node_match_ipv6 (const struct bgp_table *table, struct in6_addr *addr) addr)); } -#endif /* HAVE_IPV6 */ - static inline unsigned long bgp_table_count (const struct bgp_table *const table) { diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index e271210d..987ff298 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -107,12 +107,10 @@ bgp_parse_afi(const char *str, afi_t *afi) *afi = AFI_IP; return 0; } -#ifdef HAVE_IPV6 if (!strcmp(str, "ipv6")) { *afi = AFI_IP6; return 0; } -#endif /* HAVE_IPV6 */ return -1; } @@ -145,10 +143,8 @@ peer_address_self_check (union sockunion *su) if (su->sa.sa_family == AF_INET) ifp = if_lookup_by_ipv4_exact (&su->sin.sin_addr); -#ifdef HAVE_IPV6 else if (su->sa.sa_family == AF_INET6) ifp = if_lookup_by_ipv6_exact (&su->sin6.sin6_addr); -#endif /* HAVE IPV6 */ if (ifp) return 1; @@ -6935,7 +6931,6 @@ ALIAS (clear_bgp_as_soft, "Soft reconfig\n") /* RS-client soft reconfiguration. */ -#ifdef HAVE_IPV6 DEFUN (clear_bgp_all_rsclient, clear_bgp_all_rsclient_cmd, "clear bgp * rsclient", @@ -6981,7 +6976,6 @@ ALIAS (clear_bgp_all_rsclient, "view name\n" "Clear all peers\n" "Soft reconfig for rsclient RIB\n") -#endif /* HAVE_IPV6 */ DEFUN (clear_ip_bgp_all_rsclient, clear_ip_bgp_all_rsclient_cmd, @@ -7011,7 +7005,6 @@ ALIAS (clear_ip_bgp_all_rsclient, "Clear all peers\n" "Soft reconfig for rsclient RIB\n") -#ifdef HAVE_IPV6 DEFUN (clear_bgp_peer_rsclient, clear_bgp_peer_rsclient_cmd, "clear bgp (A.B.C.D|X:X::X:X) rsclient", @@ -7061,7 +7054,6 @@ ALIAS (clear_bgp_peer_rsclient, "BGP neighbor IP address to clear\n" "BGP IPv6 neighbor to clear\n" "Soft reconfig for rsclient RIB\n") -#endif /* HAVE_IPV6 */ DEFUN (clear_ip_bgp_peer_rsclient, clear_ip_bgp_peer_rsclient_cmd, @@ -7537,8 +7529,6 @@ DEFUN (show_bgp_ipv4_vpn_summary, return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN); } -#ifdef HAVE_IPV6 - /* `show ip bgp summary' commands. */ DEFUN (show_bgp_ipv6_vpn_summary, show_bgp_ipv6_vpn_summary_cmd, @@ -7551,7 +7541,6 @@ DEFUN (show_bgp_ipv6_vpn_summary, { return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MPLS_VPN); } -#endif DEFUN (show_bgp_ipv4_encap_summary, show_bgp_ipv4_encap_summary_cmd, @@ -7565,8 +7554,6 @@ DEFUN (show_bgp_ipv4_encap_summary, return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_ENCAP); } -#ifdef HAVE_IPV6 - DEFUN (show_bgp_ipv6_encap_summary, show_bgp_ipv6_encap_summary_cmd, "show bgp ipv6 encap summary", @@ -7579,10 +7566,6 @@ DEFUN (show_bgp_ipv6_encap_summary, return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_ENCAP); } -#endif - - - DEFUN (show_bgp_instance_summary, show_bgp_instance_summary_cmd, "show bgp view WORD summary", @@ -7605,7 +7588,6 @@ DEFUN (show_bgp_instance_summary, vty_out(vty, "-------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, argv[0], AFI_IP, SAFI_ENCAP); -#ifdef HAVE_IPV6 vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE); vty_out(vty, "---------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST); @@ -7618,7 +7600,7 @@ DEFUN (show_bgp_instance_summary, vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE); vty_out(vty, "-------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, argv[0], AFI_IP6, SAFI_ENCAP); -#endif + return CMD_SUCCESS; } @@ -7650,8 +7632,6 @@ DEFUN (show_bgp_instance_ipv4_summary, return CMD_SUCCESS; } - -#ifdef HAVE_IPV6 DEFUN (show_bgp_instance_ipv6_summary, show_bgp_instance_ipv6_summary_cmd, "show bgp view WORD ipv6 summary", @@ -7737,7 +7717,6 @@ DEFUN (show_ipv6_mbgp_summary, { return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST); } -#endif /* HAVE_IPV6 */ /* variations of show bgp [...] summary */ @@ -7762,7 +7741,6 @@ DEFUN (show_bgp_summary, vty_out(vty, "-------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_ENCAP); -#ifdef HAVE_IPV6 vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE); vty_out(vty, "---------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST); @@ -7775,7 +7753,7 @@ DEFUN (show_bgp_summary, vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE); vty_out(vty, "-------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_ENCAP); -#endif + return CMD_SUCCESS; } @@ -7789,17 +7767,11 @@ ALIAS (show_bgp_summary, DEFUN (show_bgp_summary_1w, show_bgp_summary_1w_cmd, -#ifdef HAVE_IPV6 "show bgp (ipv4|ipv6|unicast|multicast|vpn|encap) summary", -#else - "show bgp (ipv4|unicast|multicast|vpn|encap) summary", -#endif SHOW_STR BGP_STR IP_STR -#ifdef HAVE_IPV6 IP6_STR -#endif "Address Family modifier\n" "Address Family modifier\n" "Address Family modifier\n" @@ -7821,7 +7793,7 @@ DEFUN (show_bgp_summary_1w, bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_ENCAP); return CMD_SUCCESS; } -#ifdef HAVE_IPV6 + if (strcmp (argv[0], "ipv6") == 0) { vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE); vty_out(vty, "---------------------%s", VTY_NEWLINE); @@ -7837,53 +7809,45 @@ DEFUN (show_bgp_summary_1w, bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_ENCAP); return CMD_SUCCESS; } -#endif + if (strcmp (argv[0], "unicast") == 0) { vty_out(vty, "IPv4 Unicast Summary:%s", VTY_NEWLINE); vty_out(vty, "---------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST); -#ifdef HAVE_IPV6 vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, "IPv6 Unicast Summary:%s", VTY_NEWLINE); vty_out(vty, "---------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST); -#endif return CMD_SUCCESS; } if (strcmp (argv[0], "multicast") == 0) { vty_out(vty, "IPv4 Multicast Summary:%s", VTY_NEWLINE); vty_out(vty, "-----------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MULTICAST); -#ifdef HAVE_IPV6 vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, "IPv6 Multicast Summary:%s", VTY_NEWLINE); vty_out(vty, "-----------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST); -#endif return CMD_SUCCESS; } if (strcmp (argv[0], "vpn") == 0) { vty_out(vty, "IPv4 VPN Summary:%s", VTY_NEWLINE); vty_out(vty, "-----------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN); -#ifdef HAVE_IPV6 vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, "IPv6 VPN Summary:%s", VTY_NEWLINE); vty_out(vty, "-----------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MPLS_VPN); -#endif return CMD_SUCCESS; } if (strcmp (argv[0], "encap") == 0) { vty_out(vty, "IPv4 Encap Summary:%s", VTY_NEWLINE); vty_out(vty, "-------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_ENCAP); -#ifdef HAVE_IPV6 vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, "IPv6 Encap Summary:%s", VTY_NEWLINE); vty_out(vty, "-------------------%s", VTY_NEWLINE); bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_ENCAP); -#endif return CMD_SUCCESS; } vty_out(vty, "Unknown keyword: %s%s", argv[0], VTY_NEWLINE); @@ -8248,7 +8212,6 @@ bgp_show_peer (struct vty *vty, struct peer *p) || p->afc_recv[AFI_IP][SAFI_UNICAST] || p->afc_adv[AFI_IP][SAFI_MULTICAST] || p->afc_recv[AFI_IP][SAFI_MULTICAST] -#ifdef HAVE_IPV6 || p->afc_adv[AFI_IP6][SAFI_UNICAST] || p->afc_recv[AFI_IP6][SAFI_UNICAST] || p->afc_adv[AFI_IP6][SAFI_MULTICAST] @@ -8257,7 +8220,6 @@ bgp_show_peer (struct vty *vty, struct peer *p) || p->afc_recv[AFI_IP6][SAFI_MPLS_VPN] || p->afc_adv[AFI_IP6][SAFI_ENCAP] || p->afc_recv[AFI_IP6][SAFI_ENCAP] -#endif /* HAVE_IPV6 */ || p->afc_adv[AFI_IP][SAFI_ENCAP] || p->afc_recv[AFI_IP][SAFI_ENCAP] || p->afc_adv[AFI_IP][SAFI_MPLS_VPN] @@ -8513,7 +8475,6 @@ bgp_show_peer (struct vty *vty, struct peer *p) vty_out (vty, "Nexthop: %s%s", inet_ntop (AF_INET, &p->nexthop.v4, buf1, BUFSIZ), VTY_NEWLINE); -#ifdef HAVE_IPV6 vty_out (vty, "Nexthop global: %s%s", inet_ntop (AF_INET6, &p->nexthop.v6_global, buf1, BUFSIZ), VTY_NEWLINE); @@ -8523,7 +8484,6 @@ bgp_show_peer (struct vty *vty, struct peer *p) vty_out (vty, "BGP connection: %s%s", p->shared_network ? "shared network" : "non shared network", VTY_NEWLINE); -#endif /* HAVE_IPV6 */ } /* TCP metrics. */ @@ -8815,11 +8775,7 @@ DEFUN (show_bgp_neighbors, DEFUN (show_bgp_neighbors_peer, show_bgp_neighbors_peer_cmd, -#ifdef HAVE_IPV6 "show bgp neighbors (A.B.C.D|X:X::X:X)", -#else - "show bgp neighbors (A.B.C.D)", -#endif /* HAVE_IPV6 */ SHOW_STR BGP_STR "Detailed information on TCP and BGP neighbor connections\n" @@ -8843,11 +8799,7 @@ DEFUN (show_bgp_instance_neighbors, DEFUN (show_bgp_instance_neighbors_peer, show_bgp_instance_neighbors_peer_cmd, -#ifdef HAVE_IPV6 "show bgp view WORD neighbors (A.B.C.D|X:X::X:X)", -#else - "show bgp view WORD neighbors (A.B.C.D)", -#endif SHOW_STR BGP_STR "BGP view\n" @@ -9189,7 +9141,6 @@ DEFUN (show_bgp_rsclient_summary, vty_out(vty, "-------------------%s", VTY_NEWLINE); bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP, SAFI_ENCAP); -#ifdef HAVE_IPV6 vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE); vty_out(vty, "---------------------%s", VTY_NEWLINE); bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST); @@ -9202,7 +9153,7 @@ DEFUN (show_bgp_rsclient_summary, vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE); vty_out(vty, "-------------------%s", VTY_NEWLINE); bgp_show_rsclient_summary_vty (vty, NULL, AFI_IP6, SAFI_ENCAP); -#endif + return CMD_SUCCESS; } @@ -9229,7 +9180,6 @@ DEFUN (show_bgp_instance_rsclient_summary, vty_out(vty, "-------------------%s", VTY_NEWLINE); bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP, SAFI_ENCAP); -#ifdef HAVE_IPV6 vty_out(vty, "%sIPv6 Unicast Summary:%s", VTY_NEWLINE, VTY_NEWLINE); vty_out(vty, "---------------------%s", VTY_NEWLINE); bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST); @@ -9242,11 +9192,10 @@ DEFUN (show_bgp_instance_rsclient_summary, vty_out(vty, "%sIPv6 Encap Summary:%s", VTY_NEWLINE, VTY_NEWLINE); vty_out(vty, "-------------------%s", VTY_NEWLINE); bgp_show_rsclient_summary_vty (vty, argv[0], AFI_IP6, SAFI_ENCAP); -#endif + return CMD_SUCCESS; } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_rsclient_summary, show_bgp_ipv6_rsclient_summary_cmd, "show bgp ipv6 rsclient summary", @@ -9334,8 +9283,6 @@ ALIAS (show_bgp_instance_ipv6_safi_rsclient_summary, "Information about Route Server Clients\n" "Summary of all Route Server Clients\n") -#endif /* HAVE IPV6 */ - /* Redistribute VTY commands. */ DEFUN (bgp_redistribute_ipv4, @@ -9550,7 +9497,6 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_metric, "Route map reference\n" "Pointer to route-map entries\n") -#ifdef HAVE_IPV6 DEFUN (bgp_redistribute_ipv6, bgp_redistribute_ipv6_cmd, "redistribute " QUAGGA_IP6_REDIST_STR_BGPD, @@ -9763,7 +9709,6 @@ ALIAS (no_bgp_redistribute_ipv6_rmap_metric, "Default metric\n" "Route map reference\n" "Pointer to route-map entries\n") -#endif /* HAVE_IPV6 */ int bgp_config_write_redistribute (struct vty *vty, struct bgp *bgp, afi_t afi, @@ -10801,10 +10746,8 @@ bgp_vty_init (void) /* address-family commands. */ install_element (BGP_NODE, &address_family_ipv4_cmd); install_element (BGP_NODE, &address_family_ipv4_safi_cmd); -#ifdef HAVE_IPV6 install_element (BGP_NODE, &address_family_ipv6_cmd); install_element (BGP_NODE, &address_family_ipv6_safi_cmd); -#endif /* HAVE_IPV6 */ install_element (BGP_NODE, &address_family_vpnv4_cmd); install_element (BGP_NODE, &address_family_vpnv4_unicast_cmd); @@ -10813,9 +10756,7 @@ bgp_vty_init (void) install_element (BGP_NODE, &address_family_encap_cmd); install_element (BGP_NODE, &address_family_encapv4_cmd); -#ifdef HAVE_IPV6 install_element (BGP_NODE, &address_family_encapv6_cmd); -#endif /* "exit-address-family" command. */ install_element (BGP_IPV4_NODE, &exit_address_family_cmd); @@ -10834,7 +10775,6 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &clear_ip_bgp_peer_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_group_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_external_cmd); -#ifdef HAVE_IPV6 install_element (ENABLE_NODE, &clear_bgp_all_cmd); install_element (ENABLE_NODE, &clear_bgp_instance_all_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_all_cmd); @@ -10846,7 +10786,6 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &clear_bgp_ipv6_external_cmd); install_element (ENABLE_NODE, &clear_bgp_as_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_as_cmd); -#endif /* HAVE_IPV6 */ /* "clear ip bgp neighbor soft in" */ install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_in_cmd); @@ -10895,7 +10834,6 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_soft_in_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_in_cmd); -#ifdef HAVE_IPV6 install_element (ENABLE_NODE, &clear_bgp_all_soft_in_cmd); install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_in_cmd); install_element (ENABLE_NODE, &clear_bgp_all_in_cmd); @@ -10927,7 +10865,6 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_in_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_as_in_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_as_in_prefix_filter_cmd); -#endif /* HAVE_IPV6 */ /* "clear ip bgp neighbor soft out" */ install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_out_cmd); @@ -10964,7 +10901,6 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_soft_out_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_out_cmd); -#ifdef HAVE_IPV6 install_element (ENABLE_NODE, &clear_bgp_all_soft_out_cmd); install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_out_cmd); install_element (ENABLE_NODE, &clear_bgp_all_out_cmd); @@ -10986,7 +10922,6 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &clear_bgp_ipv6_external_out_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_out_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_as_out_cmd); -#endif /* HAVE_IPV6 */ /* "clear ip bgp neighbor soft" */ install_element (ENABLE_NODE, &clear_ip_bgp_all_soft_cmd); @@ -11007,7 +10942,6 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &clear_ip_bgp_all_encap_soft_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_encap_soft_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_as_encap_soft_cmd); -#ifdef HAVE_IPV6 install_element (ENABLE_NODE, &clear_bgp_all_soft_cmd); install_element (ENABLE_NODE, &clear_bgp_instance_all_soft_cmd); install_element (ENABLE_NODE, &clear_bgp_peer_soft_cmd); @@ -11019,14 +10953,12 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_group_soft_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_external_soft_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_as_soft_cmd); -#endif /* HAVE_IPV6 */ /* "clear ip bgp neighbor rsclient" */ install_element (ENABLE_NODE, &clear_ip_bgp_all_rsclient_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_all_rsclient_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_peer_rsclient_cmd); install_element (ENABLE_NODE, &clear_ip_bgp_instance_peer_rsclient_cmd); -#ifdef HAVE_IPV6 install_element (ENABLE_NODE, &clear_bgp_all_rsclient_cmd); install_element (ENABLE_NODE, &clear_bgp_instance_all_rsclient_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_all_rsclient_cmd); @@ -11035,7 +10967,6 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &clear_bgp_instance_peer_rsclient_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_peer_rsclient_cmd); install_element (ENABLE_NODE, &clear_bgp_ipv6_instance_peer_rsclient_cmd); -#endif /* HAVE_IPV6 */ /* "show ip bgp summary" commands. */ install_element (VIEW_NODE, &show_bgp_summary_cmd); @@ -11052,51 +10983,39 @@ bgp_vty_init (void) install_element (VIEW_NODE, &show_bgp_ipv4_vpn_summary_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_summary_cmd); -#ifdef HAVE_IPV6 install_element (VIEW_NODE, &show_bgp_ipv6_vpn_summary_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_encap_summary_cmd); -#endif install_element (VIEW_NODE, &show_bgp_instance_summary_cmd); -#ifdef HAVE_IPV6 install_element (VIEW_NODE, &show_bgp_ipv6_safi_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv6_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv6_safi_summary_cmd); -#endif /* HAVE_IPV6 */ install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_summary_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_ipv4_summary_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_ipv4_safi_summary_cmd); install_element (RESTRICTED_NODE, &show_bgp_ipv4_vpn_summary_cmd); install_element (RESTRICTED_NODE, &show_bgp_ipv4_encap_summary_cmd); -#ifdef HAVE_IPV6 install_element (RESTRICTED_NODE, &show_bgp_ipv6_vpn_summary_cmd); install_element (RESTRICTED_NODE, &show_bgp_ipv6_encap_summary_cmd); -#endif install_element (RESTRICTED_NODE, &show_bgp_instance_summary_cmd); -#ifdef HAVE_IPV6 install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_summary_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_summary_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_safi_summary_cmd); -#endif /* HAVE_IPV6 */ install_element (ENABLE_NODE, &show_bgp_ipv4_safi_summary_cmd); install_element (ENABLE_NODE, &show_bgp_instance_ipv4_summary_cmd); install_element (ENABLE_NODE, &show_bgp_instance_ipv4_safi_summary_cmd); install_element (ENABLE_NODE, &show_bgp_ipv4_vpn_summary_cmd); install_element (ENABLE_NODE, &show_bgp_ipv4_encap_summary_cmd); -#ifdef HAVE_IPV6 install_element (ENABLE_NODE, &show_bgp_ipv6_vpn_summary_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_encap_summary_cmd); -#endif install_element (ENABLE_NODE, &show_bgp_instance_summary_cmd); -#ifdef HAVE_IPV6 install_element (ENABLE_NODE, &show_bgp_ipv6_safi_summary_cmd); install_element (ENABLE_NODE, &show_bgp_instance_ipv6_summary_cmd); install_element (ENABLE_NODE, &show_bgp_instance_ipv6_safi_summary_cmd); -#endif /* HAVE_IPV6 */ /* "show ip bgp neighbors" commands. */ install_element (VIEW_NODE, &show_bgp_instance_neighbors_cmd); @@ -11110,15 +11029,12 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &show_bgp_neighbors_cmd); install_element (ENABLE_NODE, &show_bgp_neighbors_peer_cmd); install_element (ENABLE_NODE, &show_bgp_instance_neighbors_peer_cmd); -#ifdef HAVE_IPV6 install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd); install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd); install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbors_cmd); install_element (ENABLE_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd); -#endif /* HAVE_IPV6 */ - /* "show ip bgp rsclient" commands. */ install_element (VIEW_NODE, &show_bgp_instance_ipv4_safi_rsclient_summary_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_safi_rsclient_summary_cmd); @@ -11133,7 +11049,6 @@ bgp_vty_init (void) install_element (RESTRICTED_NODE, &show_bgp_instance_rsclient_summary_cmd); install_element (ENABLE_NODE, &show_bgp_rsclient_summary_cmd); install_element (ENABLE_NODE, &show_bgp_instance_rsclient_summary_cmd); -#ifdef HAVE_IPV6 install_element (VIEW_NODE, &show_bgp_ipv6_rsclient_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv6_rsclient_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv6_safi_rsclient_summary_cmd); @@ -11146,7 +11061,6 @@ bgp_vty_init (void) install_element (ENABLE_NODE, &show_bgp_instance_ipv6_rsclient_summary_cmd); install_element (ENABLE_NODE, &show_bgp_instance_ipv6_safi_rsclient_summary_cmd); install_element (ENABLE_NODE, &show_bgp_ipv6_safi_rsclient_summary_cmd); -#endif /* HAVE_IPV6 */ /* "show ip bgp paths" commands. */ install_element (VIEW_NODE, &show_bgp_ipv4_paths_cmd); @@ -11171,7 +11085,6 @@ bgp_vty_init (void) install_element (BGP_NODE, &bgp_redistribute_ipv4_metric_rmap_cmd); install_element (BGP_NODE, &no_bgp_redistribute_ipv4_rmap_metric_cmd); install_element (BGP_NODE, &no_bgp_redistribute_ipv4_metric_rmap_cmd); -#ifdef HAVE_IPV6 install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_cmd); install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_cmd); install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_rmap_cmd); @@ -11182,7 +11095,6 @@ bgp_vty_init (void) install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_metric_rmap_cmd); install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_rmap_metric_cmd); install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_metric_rmap_cmd); -#endif /* HAVE_IPV6 */ /* ttl_security commands */ install_element (BGP_NODE, &neighbor_ttl_security_cmd); diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 1be4440a..af312e3c 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -305,7 +305,6 @@ zebra_read_ipv4 (int command, struct zclient *zclient, zebra_size_t length, return 0; } -#ifdef HAVE_IPV6 /* Zebra route add and delete treatment. */ static int zebra_read_ipv6 (int command, struct zclient *zclient, zebra_size_t length, @@ -387,7 +386,6 @@ zebra_read_ipv6 (int command, struct zclient *zclient, zebra_size_t length, return 0; } -#endif /* HAVE_IPV6 */ struct interface * if_lookup_by_ipv4 (struct in_addr *addr) @@ -440,7 +438,6 @@ if_lookup_by_ipv4_exact (struct in_addr *addr) return NULL; } -#ifdef HAVE_IPV6 struct interface * if_lookup_by_ipv6 (struct in6_addr *addr) { @@ -533,7 +530,6 @@ if_get_ipv6_local (struct interface *ifp, struct in6_addr *addr) } return 0; } -#endif /* HAVE_IPV6 */ static int if_get_ipv4_address (struct interface *ifp, struct in_addr *addr) @@ -573,7 +569,6 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote, nexthop->v4 = local->sin.sin_addr; ifp = if_lookup_by_ipv4 (&local->sin.sin_addr); } -#ifdef HAVE_IPV6 if (local->sa.sa_family == AF_INET6) { if (IN6_IS_ADDR_LINKLOCAL (&local->sin6.sin6_addr)) @@ -584,7 +579,6 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote, else ifp = if_lookup_by_ipv6 (&local->sin6.sin6_addr); } -#endif /* HAVE_IPV6 */ if (!ifp) return -1; @@ -594,7 +588,6 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote, /* IPv4 connection. */ if (local->sa.sa_family == AF_INET) { -#ifdef HAVE_IPV6 /* IPv6 nexthop*/ ret = if_get_ipv6_global (ifp, &nexthop->v6_global); @@ -603,10 +596,8 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote, if_get_ipv6_local (ifp, &nexthop->v6_global); else if_get_ipv6_local (ifp, &nexthop->v6_local); -#endif /* HAVE_IPV6 */ } -#ifdef HAVE_IPV6 /* IPv6 connection. */ if (local->sa.sa_family == AF_INET6) { @@ -663,7 +654,6 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote, SET_IN6_LINKLOCAL_IFINDEX (nexthop->v6_local, 0); } #endif /* KAME */ -#endif /* HAVE_IPV6 */ return ret; } @@ -763,7 +753,7 @@ bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp, sa zapi_ipv4_route (ZEBRA_IPV4_ROUTE_ADD, zclient, (struct prefix_ipv4 *) p, &api); } -#ifdef HAVE_IPV6 + /* We have to think about a IPv6 link-local address curse. */ if (p->family == AF_INET6) { @@ -833,7 +823,6 @@ bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp, sa zapi_ipv6_route (ZEBRA_IPV6_ROUTE_ADD, zclient, (struct prefix_ipv6 *) p, &api); } -#endif /* HAVE_IPV6 */ } void @@ -888,7 +877,7 @@ bgp_zebra_withdraw (struct prefix *p, struct bgp_info *info, safi_t safi) zapi_ipv4_route (ZEBRA_IPV4_ROUTE_DELETE, zclient, (struct prefix_ipv4 *) p, &api); } -#ifdef HAVE_IPV6 + /* We have to think about a IPv6 link-local address curse. */ if (p->family == AF_INET6) { @@ -916,7 +905,6 @@ bgp_zebra_withdraw (struct prefix *p, struct bgp_info *info, safi_t safi) zapi_ipv6_route (ZEBRA_IPV6_ROUTE_DELETE, zclient, (struct prefix_ipv6 *) p, &api); } -#endif /* HAVE_IPV6 */ } /* Other routes redistribution into BGP. */ @@ -1074,10 +1062,8 @@ bgp_zebra_init (struct thread_master *master) zclient->ipv4_route_delete = zebra_read_ipv4; zclient->interface_up = bgp_interface_up; zclient->interface_down = bgp_interface_down; -#ifdef HAVE_IPV6 zclient->ipv6_route_add = zebra_read_ipv6; zclient->ipv6_route_delete = zebra_read_ipv6; -#endif /* HAVE_IPV6 */ bgp_nexthop_buf = stream_new(BGP_NEXTHOP_BUF_SIZE); } diff --git a/bgpd/bgp_zebra.h b/bgpd/bgp_zebra.h index ff9b375b..e69a0bc5 100644 --- a/bgpd/bgp_zebra.h +++ b/bgpd/bgp_zebra.h @@ -44,9 +44,7 @@ extern int bgp_redistribute_metric_unset (struct bgp *, afi_t, int); extern struct interface *if_lookup_by_ipv4 (struct in_addr *); extern struct interface *if_lookup_by_ipv4_exact (struct in_addr *); -#ifdef HAVE_IPV6 extern struct interface *if_lookup_by_ipv6 (struct in6_addr *); extern struct interface *if_lookup_by_ipv6_exact (struct in6_addr *); -#endif /* HAVE_IPV6 */ #endif /* _QUAGGA_BGP_ZEBRA_H */ diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index eb638950..455034f5 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -205,10 +205,8 @@ struct bgp_nexthop { struct interface *ifp; struct in_addr v4; -#ifdef HAVE_IPV6 struct in6_addr v6_global; struct in6_addr v6_local; -#endif /* HAVE_IPV6 */ }; /* BGP router distinguisher value. */ -- cgit v1.2.3