[quagga-dev 11495] Re: patch: require IPv6 API built-time support

Vincent JARDIN vincent.jardin at 6wind.com
Fri Sep 12 12:46:43 BST 2014


Yes these ifdef have to be removed.
Le 12 sept. 2014 13:07, "Paul Jakma" <paul at jakma.org> a écrit :

> Yeah, the below is purely about built-time requirement for IPv6 APIs.
>
> It doesn't mean the system must have working IPv6 networks - just that the
> more modern APIs and code are present in the system.
>
> regards,
>
> Paul
>
> On Fri, 12 Sep 2014, David Lamparter wrote:
>
>  This would be the time for anyone using --disable-ipv6 to speak up... if
>> there are use cases / people need this, I guess we can keep it around,
>> but that really needs to be based on good reasoning.
>>
>> In particular, "I don't use IPv6" isn't enough, since (a) you really
>> should be using IPv6 these days, and (b) your OS probably supports it
>> anyway, and the probability for bugs is higher with the switcheroo than
>> it is with having IPv6 supported but dormant.
>>
>> Cheers,
>>
>>
>> -David
>>
>> P.S.: OS support refers to the C library, not to someone switching off
>> knobs in their kernel for random reasons...  the latter is no trouble at
>> all, if you have no IPv6 in your kernel at runtime that's something we
>> need to/should support.  If *that* doesn't work, that would be a bug to
>> be fixed.
>>
>> On Fri, Sep 12, 2014 at 11:44:15AM +0100, Paul Jakma wrote:
>>
>>> Sifting through old stuff. Below is something I had that I've rebased.
>>> Only a semi-serious proposal to merge it. One of those "be nice to do,
>>> but
>>> is it worth the huge amount of churn?" things.
>>>
>>> commit 2accfd84f19e4b30ddef064081aa515ddbfd556a
>>> Author: Paul Jakma <paul at quagga.net>
>>> Date:   Sun Jul 26 19:13:18 2009 +0100
>>>
>>>      [global] Assume all supported platforms support IPv6 APIs
>>>
>>>      * */*: Require getaddrinfo, remove HAVE_IPV6, and rip out some old
>>> code.
>>>
>>> diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
>>> index fcf8255..61cc45c 100644
>>> --- a/bgpd/bgp_attr.c
>>> +++ b/bgpd/bgp_attr.c
>>> @@ -396,11 +396,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;
>>> @@ -427,11 +425,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
>>> @@ -564,9 +560,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;
>>>   }
>>> @@ -622,9 +616,7 @@ 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);
>>> @@ -1514,7 +1506,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 16:
>>>         stream_get (&attre->mp_nexthop_global, s, 16);
>>>         break;
>>> @@ -1536,7 +1527,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);
>>> @@ -2103,7 +2093,6 @@ bgp_packet_mpattr_start (struct stream *s, afi_t
>>> afi, safi_t safi,
>>>           break;
>>>         }
>>>         break;
>>> -#ifdef HAVE_IPV6
>>>       case AFI_IP6:
>>>         switch (safi)
>>>         {
>>> @@ -2123,7 +2112,6 @@ bgp_packet_mpattr_start (struct stream *s, afi_t
>>> afi, safi_t safi,
>>>         break;
>>>         }
>>>         break;
>>> -#endif /*HAVE_IPV6*/
>>>       default:
>>>         break;
>>>       }
>>> @@ -2397,7 +2385,7 @@ bgp_packet_attribute (struct bgp *bgp, struct peer
>>> *peer,
>>>             stream_put_in_addr (s, &bgp->router_id);
>>>         }
>>>       }
>>> -
>>> +
>>>     /* Extended Communities attribute. */
>>>     if (CHECK_FLAG (peer->af_flags[afi][safi],
>>> PEER_FLAG_SEND_EXT_COMMUNITY)
>>>         && (attr->flag & ATTR_FLAG_BIT (BGP_ATTR_EXT_COMMUNITIES)))
>>> @@ -2621,10 +2609,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 */
>>> -     )
>>> +     && prefix->family != AF_INET6)
>>>       {
>>>         stream_putc (s, BGP_ATTR_FLAG_TRANS);
>>>         stream_putc (s, BGP_ATTR_NEXT_HOP);
>>> @@ -2687,7 +2672,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) )
>>> @@ -2719,7 +2703,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 cb401e7..c577f74 100644
>>> --- a/bgpd/bgp_attr.h
>>> +++ b/bgpd/bgp_attr.h
>>> @@ -54,10 +54,8 @@ Software Foundation, Inc., 59 Temple Place - Suite
>>> 330, Boston, MA
>>>   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 1d09769..b9753bb 100644
>>> --- a/bgpd/bgp_debug.c
>>> +++ b/bgpd/bgp_debug.c
>>> @@ -174,7 +174,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];
>>> @@ -191,7 +190,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_dump.c b/bgpd/bgp_dump.c
>>> index a3c9526..a7eac81 100644
>>> --- a/bgpd/bgp_dump.c
>>> +++ b/bgpd/bgp_dump.c
>>> @@ -232,12 +232,10 @@ bgp_dump_routes_index_table(struct bgp *bgp)
>>>           {
>>>             stream_putc (obuf, TABLE_DUMP_V2_PEER_INDEX_
>>> TABLE_AS4+TABLE_DUMP_V2_PEER_INDEX_TABLE_IP);
>>>           }
>>> -#ifdef HAVE_IPV6
>>>         else if (sockunion_family(&peer->su) == AF_INET6)
>>>           {
>>>             stream_putc (obuf, TABLE_DUMP_V2_PEER_INDEX_
>>> TABLE_AS4+TABLE_DUMP_V2_PEER_INDEX_TABLE_IP6);
>>>           }
>>> -#endif /* HAVE_IPV6 */
>>>
>>>         /* Peer's BGP ID */
>>>         stream_put_in_addr (obuf, &peer->remote_id);
>>> @@ -247,13 +245,11 @@ bgp_dump_routes_index_table(struct bgp *bgp)
>>>           {
>>>             stream_put_in_addr (obuf, &peer->su.sin.sin_addr);
>>>           }
>>> -#ifdef HAVE_IPV6
>>>         else if (sockunion_family(&peer->su) == AF_INET6)
>>>           {
>>>             stream_write (obuf, (u_char *)&peer->su.sin6.sin6_addr,
>>>                           IPV6_MAX_BYTELEN);
>>>           }
>>> -#endif /* HAVE_IPV6 */
>>>
>>>         /* Peer's AS number. */
>>>         /* Note that, as this is an AS4 compliant quagga, the RIB is
>>> always AS4 */
>>> @@ -312,12 +308,10 @@ bgp_dump_routes_func (int afi, int first_run,
>>> unsigned int seq)
>>>           {
>>>             bgp_dump_header (obuf, MSG_TABLE_DUMP_V2,
>>> TABLE_DUMP_V2_RIB_IPV4_UNICAST);
>>>           }
>>> -#ifdef HAVE_IPV6
>>>         else if (afi == AFI_IP6)
>>>           {
>>>             bgp_dump_header (obuf, MSG_TABLE_DUMP_V2,
>>> TABLE_DUMP_V2_RIB_IPV6_UNICAST);
>>>           }
>>> -#endif /* HAVE_IPV6 */
>>>
>>>         /* Sequence number */
>>>         stream_putl(obuf, seq);
>>> @@ -331,13 +325,11 @@ bgp_dump_routes_func (int afi, int first_run,
>>> unsigned int seq)
>>>             /* We'll dump only the useful bits (those not 0), but have
>>> to align on 8 bits */
>>>             stream_write(obuf, (u_char *)&rn->p.u.prefix4,
>>> (rn->p.prefixlen+7)/8);
>>>           }
>>> -#ifdef HAVE_IPV6
>>>         else if (afi == AFI_IP6)
>>>           {
>>>             /* We'll dump only the useful bits (those not 0), but have
>>> to align on 8 bits */
>>>             stream_write (obuf, (u_char *)&rn->p.u.prefix6,
>>> (rn->p.prefixlen+7)/8);
>>>           }
>>> -#endif /* HAVE_IPV6 */
>>>
>>>         /* Save where we are now, so we can overwride the entry count
>>> later */
>>>         int sizep = stream_get_endp(obuf);
>>> @@ -396,9 +388,7 @@ bgp_dump_interval_func (struct thread *t)
>>>         if (bgp_dump->type == BGP_DUMP_ROUTES)
>>>         {
>>>           unsigned int seq = bgp_dump_routes_func (AFI_IP, 1, 0);
>>> -#ifdef HAVE_IPV6
>>>           bgp_dump_routes_func (AFI_IP6, 0, seq);
>>> -#endif /* HAVE_IPV6 */
>>>           /* Close the file now. For a RIB dump there's no point in
>>> leaving
>>>            * it open until the next scheduled dump starts. */
>>>           fclose(bgp_dump->fp); bgp_dump->fp = NULL;
>>> @@ -442,7 +432,6 @@ bgp_dump_common (struct stream *obuf, struct peer
>>> *peer, int forceas4)
>>>         else
>>>         stream_put (obuf, empty, IPV4_MAX_BYTELEN);
>>>       }
>>> -#ifdef HAVE_IPV6
>>>     else if (peer->su.sa.sa_family == AF_INET6)
>>>       {
>>>         /* Interface Index and Address family. */
>>> @@ -457,7 +446,6 @@ bgp_dump_common (struct stream *obuf, struct peer
>>> *peer, int forceas4)
>>>         else
>>>         stream_put (obuf, empty, IPV6_MAX_BYTELEN);
>>>       }
>>> -#endif /* HAVE_IPV6 */
>>>   }
>>>
>>>   /* Dump BGP status change. */
>>> diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c
>>> index 7999d16..3164f19 100644
>>> --- a/bgpd/bgp_mpath.c
>>> +++ b/bgpd/bgp_mpath.c
>>> @@ -120,7 +120,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);
>>> @@ -132,7 +131,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 */
>>>           }
>>>       }
>>>
>>> @@ -715,10 +713,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_network.c b/bgpd/bgp_network.c
>>> index c052744..54377c4 100644
>>> --- a/bgpd/bgp_network.c
>>> +++ b/bgpd/bgp_network.c
>>> @@ -384,10 +384,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
>>> @@ -401,10 +399,8 @@ bgp_connect (struct peer *peer)
>>>     /* Update source bind. */
>>>     bgp_update_source (peer);
>>>
>>> -#ifdef HAVE_IPV6
>>>     if (peer->ifname)
>>>       ifindex = if_nametoindex (peer->ifname);
>>> -#endif /* HAVE_IPV6 */
>>>
>>>     if (BGP_DEBUG (events, EVENTS))
>>>       plog_debug (peer->log, "%s [Event] Connect start to %s fd %d",
>>> @@ -452,10 +448,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);
>>> @@ -488,7 +482,6 @@ bgp_listener (int sock, struct sockaddr *sa,
>>> socklen_t salen)
>>>   }
>>>
>>>   /* IPv6 supported version of BGP server socket setup.  */
>>> -#if defined (HAVE_IPV6) && ! defined (NRL)
>>>   int
>>>   bgp_socket (unsigned short port, const char *address)
>>>   {
>>> @@ -545,50 +538,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, en;
>>> -
>>> -  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 && !NRL */
>>>
>>>   void
>>>   bgp_close (void)
>>> diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c
>>> index 5b1d13a..53934a0 100644
>>> --- a/bgpd/bgp_nexthop.c
>>> +++ b/bgpd/bgp_nexthop.c
>>> @@ -42,9 +42,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;
>>> @@ -132,7 +130,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;
>>> @@ -144,7 +141,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;
>>> @@ -196,7 +192,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)
>>> @@ -215,11 +210,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,
>>> @@ -304,7 +297,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
>>> @@ -324,10 +316,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;
>>>
>>> @@ -535,10 +525,7 @@ bgp_scan_timer (struct thread *t)
>>>       zlog_debug ("Performing BGP general scanning");
>>>
>>>     bgp_scan (AFI_IP, SAFI_UNICAST);
>>> -
>>> -#ifdef HAVE_IPV6
>>>     bgp_scan (AFI_IP6, SAFI_UNICAST);
>>> -#endif /* HAVE_IPV6 */
>>>
>>>     return 0;
>>>   }
>>> @@ -671,7 +658,6 @@ bgp_connected_add (struct connected *ifc)
>>>           rn->info = bc;
>>>         }
>>>       }
>>> -#ifdef HAVE_IPV6
>>>     else if (addr->family == AF_INET6)
>>>       {
>>>         PREFIX_COPY_IPV6(&p, CONNECTED_PREFIX(ifc));
>>> @@ -696,7 +682,6 @@ bgp_connected_add (struct connected *ifc)
>>>           rn->info = bc;
>>>         }
>>>       }
>>> -#endif /* HAVE_IPV6 */
>>>   }
>>>
>>>   void
>>> @@ -739,7 +724,6 @@ bgp_connected_delete (struct connected *ifc)
>>>         bgp_unlock_node (rn);
>>>         bgp_unlock_node (rn);
>>>       }
>>> -#ifdef HAVE_IPV6
>>>     else if (addr->family == AF_INET6)
>>>       {
>>>         PREFIX_COPY_IPV6(&p, CONNECTED_PREFIX(ifc));
>>> @@ -765,7 +749,6 @@ bgp_connected_delete (struct connected *ifc)
>>>         bgp_unlock_node (rn);
>>>         bgp_unlock_node (rn);
>>>       }
>>> -#endif /* HAVE_IPV6 */
>>>   }
>>>
>>>   int
>>> @@ -894,7 +877,6 @@ zlookup_query (struct in_addr addr)
>>>     return zlookup_read ();
>>>   }
>>>
>>> -#ifdef HAVE_IPV6
>>>   static struct bgp_nexthop_cache *
>>>   zlookup_read_ipv6 (void)
>>>   {
>>> @@ -1006,7 +988,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,
>>> @@ -1335,7 +1316,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;
>>> @@ -1367,7 +1347,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]);
>>> @@ -1377,7 +1356,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;
>>> @@ -1388,7 +1366,6 @@ show_ip_bgp_scan_tables (struct vty *vty, const
>>> char detail)
>>>                  rn->p.prefixlen,
>>>                  VTY_NEWLINE);
>>>     }
>>> -#endif /* HAVE_IPV6 */
>>>
>>>     return CMD_SUCCESS;
>>>   }
>>> @@ -1440,12 +1417,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 (master, bgp_scan_timer,
>>> @@ -1478,7 +1453,6 @@ bgp_scan_finish (void)
>>>     bgp_table_unlock (bgp_connected_table[AFI_IP]);
>>>     bgp_connected_table[AFI_IP] = NULL;
>>>
>>> -#ifdef HAVE_IPV6
>>>     /* Only the current one needs to be reset. */
>>>     bgp_nexthop_cache_reset (bgp_nexthop_cache_table[AFI_IP6]);
>>>
>>> @@ -1490,5 +1464,4 @@ bgp_scan_finish (void)
>>>
>>>     bgp_table_unlock (bgp_connected_table[AFI_IP6]);
>>>     bgp_connected_table[AFI_IP6] = NULL;
>>> -#endif /* HAVE_IPV6 */
>>>   }
>>> diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
>>> index 7bf3501..991c5ad 100644
>>> --- a/bgpd/bgp_open.c
>>> +++ b/bgpd/bgp_open.c
>>> @@ -127,9 +127,7 @@ bgp_afi_safi_valid_indices (afi_t afi, safi_t *safi)
>>>     switch (afi)
>>>       {
>>>         case AFI_IP:
>>> -#ifdef HAVE_IPV6
>>>         case AFI_IP6:
>>> -#endif
>>>           switch (*safi)
>>>             {
>>>               /* BGP MPLS-labeled VPN SAFI isn't contigious with others,
>>> remap */
>>> @@ -950,7 +948,6 @@ bgp_open_capability (struct stream *s, struct peer
>>> *peer)
>>>         stream_putc (s, 0);
>>>         stream_putc (s, SAFI_MPLS_LABELED_VPN);
>>>       }
>>> -#ifdef HAVE_IPV6
>>>     /* IPv6 unicast. */
>>>     if (peer->afc[AFI_IP6][SAFI_UNICAST])
>>>       {
>>> @@ -975,7 +972,6 @@ bgp_open_capability (struct stream *s, struct peer
>>> *peer)
>>>         stream_putc (s, 0);
>>>         stream_putc (s, SAFI_MULTICAST);
>>>       }
>>> -#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 65c6cac..10412f0 100644
>>> --- a/bgpd/bgp_packet.c
>>> +++ b/bgpd/bgp_packet.c
>>> @@ -441,10 +441,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))
>>> @@ -514,10 +512,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 04cbb8a..a9f5a4d 100644
>>> --- a/bgpd/bgp_route.c
>>> +++ b/bgpd/bgp_route.c
>>> @@ -830,10 +830,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. */
>>> @@ -977,20 +975,16 @@ bgp_announce_check (struct bgp_info *ri, struct
>>> peer *peer, struct prefix *p,
>>>         || (reflect && ! CHECK_FLAG (peer->af_flags[afi][safi],
>>> PEER_FLAG_NEXTHOP_SELF_ALL))
>>>         || (CHECK_FLAG (peer->af_flags[afi][safi],
>>> PEER_FLAG_NEXTHOP_UNCHANGED)
>>>           && ((p->family == AF_INET && attr->nexthop.s_addr)
>>> -#ifdef HAVE_IPV6
>>>               || (p->family == AF_INET6 &&
>>>                     ! 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)
>>>            || (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 */
>>>            || (peer->sort == BGP_PEER_EBGP
>>>                && bgp_multiaccess_check_v4 (attr->nexthop, peer->host)
>>> == 0))
>>>       {
>>> @@ -1003,7 +997,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 (p->family == AF_INET6)
>>>         {
>>> @@ -1012,10 +1005,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)
>>>       {
>>>         /* Left nexthop_local unchanged if so configured. */
>>> @@ -1054,7 +1045,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
>>> @@ -1135,10 +1125,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
>>> @@ -1197,10 +1185,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. */
>>> @@ -1212,7 +1198,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)
>>>         {
>>> @@ -1221,10 +1206,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;
>>> @@ -1266,7 +1249,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.  */
>>> @@ -2498,7 +2480,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;
>>> @@ -2520,7 +2501,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)
>>>       {
>>> @@ -3147,7 +3127,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)
>>>         {
>>> @@ -3162,7 +3141,6 @@ bgp_nlri_parse (struct peer *peer, struct attr
>>> *attr, struct bgp_nlri *packet)
>>>               continue;
>>>             }
>>>         }
>>> -#endif /* HAVE_IPV6 */
>>>
>>>         /* Normal process. */
>>>         if (attr)
>>> @@ -3710,14 +3688,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);
>>>
>>> @@ -3803,14 +3779,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);
>>>
>>> @@ -4289,7 +4263,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",
>>> @@ -4347,7 +4320,6 @@ ALIAS (no_ipv6_bgp_network,
>>>          BGP_STR
>>>          "Specify a network to announce via BGP\n"
>>>          "IPv6 prefix <network>/<length>, e.g., 3ffe::/16\n")
>>> -#endif /* HAVE_IPV6 */
>>>
>>>   /* stubs for removed AS-Pathlimit commands, kept for config
>>> compatibility */
>>>   ALIAS_DEPRECATED (bgp_network,
>>> @@ -4454,7 +4426,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>",
>>> @@ -4470,7 +4441,6 @@ ALIAS_DEPRECATED (no_ipv6_bgp_network,
>>>          "IPv6 prefix <network>/<length>\n"
>>>          "AS-Path hopcount limit attribute\n"
>>>          "AS-Pathlimit TTL, in number of AS-Path hops\n")
>>> -#endif /* HAVE_IPV6 */
>>>
>>>   /* Aggreagete address:
>>>
>>> @@ -5304,7 +5274,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",
>>> @@ -5381,7 +5350,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
>>> @@ -5405,14 +5373,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);
>>> @@ -5685,7 +5651,6 @@ route_vty_out (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;
>>> @@ -5700,7 +5665,6 @@ route_vty_out (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);
>>> @@ -5748,7 +5712,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;
>>> @@ -5765,7 +5728,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);
>>> @@ -5821,7 +5783,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);
>>> @@ -5839,7 +5800,6 @@ route_vty_out_tag (struct vty *vty, struct prefix
>>> *p,
>>>                                 buf1, BUFSIZ));
>>>
>>>         }
>>> -#endif /* HAVE_IPV6 */
>>>       }
>>>
>>>     label = decode_label (binfo->extra->tag);
>>> @@ -6002,7 +5962,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);
>>> @@ -6010,7 +5969,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)
>>>         {
>>> @@ -6032,7 +5990,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)
>>>         {
>>> @@ -6041,7 +5998,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]);
>>> @@ -6859,7 +6815,6 @@ DEFUN (show_ip_bgp_view_prefix,
>>>     return bgp_show_route (vty, argv[0], argv[1], AFI_IP, SAFI_UNICAST,
>>> NULL, 1);
>>>   }
>>>
>>> -#ifdef HAVE_IPV6
>>>   DEFUN (show_bgp,
>>>          show_bgp_cmd,
>>>          "show bgp",
>>> @@ -7106,8 +7061,6 @@ DEFUN (show_ipv6_mbgp_prefix,
>>>   {
>>>     return bgp_show_route (vty, NULL, argv[0], AFI_IP6, SAFI_MULTICAST,
>>> NULL, 1);
>>>   }
>>> -#endif
>>> -
>>>
>>>   static int
>>>   bgp_show_regexp (struct vty *vty, int argc, const char **argv, afi_t
>>> afi,
>>> @@ -7201,7 +7154,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",
>>> @@ -7250,7 +7202,6 @@ DEFUN (show_ipv6_mbgp_regexp,
>>>     return bgp_show_regexp (vty, argc, argv, AFI_IP6, SAFI_MULTICAST,
>>>                           bgp_show_type_regexp);
>>>   }
>>> -#endif /* HAVE_IPV6 */
>>>
>>>   static int
>>>   bgp_show_prefix_list (struct vty *vty, const char *prefix_list_str,
>>> afi_t afi,
>>> @@ -7316,7 +7267,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",
>>> @@ -7365,7 +7315,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 */
>>>
>>>   static int
>>>   bgp_show_filter_list (struct vty *vty, const char *filter, afi_t afi,
>>> @@ -7430,7 +7379,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",
>>> @@ -7479,7 +7427,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 */
>>>
>>>   static int
>>>   bgp_show_route_map (struct vty *vty, const char *rmap_str, afi_t afi,
>>> @@ -7641,7 +7588,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",
>>> @@ -7686,7 +7632,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 */
>>>
>>>   static int
>>>   bgp_show_community (struct vty *vty, const char *view_name, int argc,
>>> @@ -7918,19 +7863,13 @@ ALIAS (show_ip_bgp_ipv4_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")
>>> @@ -7947,31 +7886,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"
>>> @@ -7983,32 +7911,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"
>>> @@ -8023,19 +7939,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"
>>> @@ -8054,19 +7964,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"
>>> @@ -8260,7 +8164,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)",
>>> @@ -8878,7 +8781,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 */
>>>
>>>   static int
>>>   bgp_show_community_list (struct vty *vty, const char *com, int exact,
>>> @@ -8965,7 +8867,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)",
>>> @@ -9065,7 +8966,6 @@ DEFUN (show_ipv6_mbgp_community_list_exact,
>>>   {
>>>     return bgp_show_community_list (vty, argv[0], 1, AFI_IP6,
>>> SAFI_MULTICAST);
>>>   }
>>> -#endif /* HAVE_IPV6 */
>>>
>>>   static int
>>>   bgp_show_prefix_longer (struct vty *vty, const char *prefix, afi_t afi,
>>> @@ -9160,7 +9060,6 @@ DEFUN (show_ip_bgp_flap_prefix,
>>>     return bgp_show_prefix_longer (vty, argv[0], AFI_IP, SAFI_UNICAST,
>>>                                  bgp_show_type_flap_prefix);
>>>   }
>>> -#ifdef HAVE_IPV6
>>>   DEFUN (show_bgp_prefix_longer,
>>>          show_bgp_prefix_longer_cmd,
>>>          "show bgp X:X::X:X/M longer-prefixes",
>>> @@ -9209,7 +9108,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 */
>>>
>>>   static struct peer *
>>>   peer_lookup_in_view (struct vty *vty, const char *view_name,
>>> @@ -10015,7 +9913,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",
>>> @@ -10145,7 +10042,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,
>>> @@ -10212,19 +10108,13 @@ DEFUN (show_ip_bgp_ipv4_neighbor_
>>> received_routes,
>>>
>>>   DEFUN (show_bgp_view_afi_safi_neighbor_adv_recd_routes,
>>>          show_bgp_view_afi_safi_neighbor_adv_recd_routes_cmd,
>>> -#ifdef HAVE_IPV6
>>>          "show bgp view WORD (ipv4|ipv6) (unicast|multicast) neighbors
>>> (A.B.C.D|X:X::X:X) (advertised-routes|received-routes)",
>>> -#else
>>> -       "show bgp view WORD ipv4 (unicast|multicast) neighbors
>>> (A.B.C.D|X:X::X:X) (advertised-routes|received-routes)",
>>> -#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"
>>>          "Detailed information on TCP and BGP neighbor connections\n"
>>> @@ -10238,24 +10128,14 @@ DEFUN (show_bgp_view_afi_safi_
>>> neighbor_adv_recd_routes,
>>>     int in;
>>>     struct peer *peer;
>>>
>>> -#ifdef HAVE_IPV6
>>>       peer = peer_lookup_in_view (vty, argv[0], argv[3]);
>>> -#else
>>> -    peer = peer_lookup_in_view (vty, argv[0], argv[2]);
>>> -#endif
>>>
>>>     if (! peer)
>>>       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;
>>>     in = (strncmp (argv[4], "r", 1) == 0) ? 1 : 0;
>>> -#else
>>> -  afi = AFI_IP;
>>> -  safi = (strncmp (argv[1], "m", 1) == 0) ? SAFI_MULTICAST :
>>> SAFI_UNICAST;
>>> -  in = (strncmp (argv[3], "r", 1) == 0) ? 1 : 0;
>>> -#endif
>>>
>>>     return peer_adj_routes (vty, peer, afi, safi, in);
>>>   }
>>> @@ -10355,7 +10235,6 @@ DEFUN (show_ip_bgp_ipv4_neighbor_
>>> received_prefix_filter,
>>>   }
>>>
>>>
>>> -#ifdef HAVE_IPV6
>>>   ALIAS (show_bgp_view_neighbor_received_routes,
>>>          show_bgp_neighbor_received_routes_cmd,
>>>          "show bgp neighbors (A.B.C.D|X:X::X:X) received-routes",
>>> @@ -10522,7 +10401,6 @@ ALIAS (show_bgp_view_neighbor_
>>> received_prefix_filter,
>>>          "Neighbor to display information about\n"
>>>          "Display information received from a BGP neighbor\n"
>>>          "Display the prefixlist filter\n")
>>> -#endif /* HAVE_IPV6 */
>>>
>>>   static int
>>>   bgp_show_neighbor_route (struct vty *vty, struct peer *peer, afi_t afi,
>>> @@ -11046,7 +10924,6 @@ ALIAS (show_bgp_view_ipv4_safi_rsclient_prefix,
>>>          NEIGHBOR_ADDR_STR
>>>          "IP prefix <network>/<length>, e.g., 35.0.0.0/8\n
>>> <http://35.0.0.0/8%5Cn>")
>>>
>>> -#ifdef HAVE_IPV6
>>>   DEFUN (show_bgp_view_neighbor_routes,
>>>          show_bgp_view_neighbor_routes_cmd,
>>>          "show bgp view WORD neighbors (A.B.C.D|X:X::X:X) routes",
>>> @@ -11674,7 +11551,6 @@ ALIAS (show_bgp_view_ipv6_safi_rsclient_prefix,
>>>          NEIGHBOR_ADDR_STR
>>>          "IP prefix <network>/<length>, e.g., 3ffe::/16\n")
>>>
>>> -#endif /* HAVE_IPV6 */
>>>
>>>   struct bgp_table *bgp_distance_table;
>>>
>>> @@ -12731,7 +12607,6 @@ bgp_route_init (void)
>>>     install_element (ENABLE_NODE, &show_ip_bgp_neighbor_prefix_
>>> counts_cmd);
>>>     install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbor_
>>> prefix_counts_cmd);
>>>     install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_neighbor_
>>> prefix_counts_cmd);
>>> -#ifdef HAVE_IPV6
>>>     install_element (ENABLE_NODE, &show_bgp_ipv6_neighbor_
>>> prefix_counts_cmd);
>>>
>>>     /* New config IPv6 BGP commands.  */
>>> @@ -13064,7 +12939,6 @@ bgp_route_init (void)
>>>     install_element (ENABLE_NODE, &ipv6_bgp_neighbor_routes_cmd);
>>>     install_element (VIEW_NODE, &ipv6_mbgp_neighbor_routes_cmd);
>>>     install_element (ENABLE_NODE, &ipv6_mbgp_neighbor_routes_cmd);
>>> -#endif /* HAVE_IPV6 */
>>>
>>>     install_element (BGP_NODE, &bgp_distance_cmd);
>>>     install_element (BGP_NODE, &no_bgp_distance_cmd);
>>> @@ -13128,10 +13002,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
>>>   }
>>>
>>>   void
>>> diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
>>> index c498f58..62a684f 100644
>>> --- a/bgpd/bgp_routemap.c
>>> +++ b/bgpd/bgp_routemap.c
>>> @@ -1754,7 +1754,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
>>> @@ -2025,7 +2024,6 @@ struct route_map_rule_cmd
>>> route_set_ipv6_nexthop_local_cmd =
>>>     route_set_ipv6_nexthop_local_compile,
>>>     route_set_ipv6_nexthop_local_free
>>>   };
>>> -#endif /* HAVE_IPV6 */
>>>
>>>   /* `set vpnv4 nexthop A.B.C.D' */
>>>
>>> @@ -2340,11 +2338,9 @@ bgp_route_map_update (const char *unused)
>>>           if (bgp->rmap[ZEBRA_FAMILY_IPV4][i].name)
>>>             bgp->rmap[ZEBRA_FAMILY_IPV4][i].map =
>>>               route_map_lookup_by_name (bgp->rmap[ZEBRA_FAMILY_IPV4][
>>> i].name);
>>> -#ifdef HAVE_IPV6
>>>           if (bgp->rmap[ZEBRA_FAMILY_IPV6][i].name)
>>>             bgp->rmap[ZEBRA_FAMILY_IPV6][i].map =
>>>               route_map_lookup_by_name (bgp->rmap[ZEBRA_FAMILY_IPV6][
>>> i].name);
>>> -#endif /* HAVE_IPV6 */
>>>         }
>>>       }
>>>   }
>>> @@ -3503,7 +3499,6 @@ ALIAS (no_set_aggregator_as,
>>>          "IP address of aggregator\n")
>>>
>>>
>>> -#ifdef HAVE_IPV6
>>>   DEFUN (match_ipv6_address,
>>>          match_ipv6_address_cmd,
>>>          "match ipv6 address WORD",
>>> @@ -3648,7 +3643,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,
>>> @@ -3907,7 +3901,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);
>>> @@ -3926,7 +3919,6 @@ bgp_route_map_init (void)
>>>     install_element (RMAP_NODE, &set_ipv6_nexthop_local_cmd);
>>>     install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_cmd);
>>>     install_element (RMAP_NODE, &no_set_ipv6_nexthop_local_val_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 04a1d37..b413ab8 100644
>>> --- a/bgpd/bgp_table.h
>>> +++ b/bgpd/bgp_table.h
>>> @@ -83,7 +83,6 @@ extern void bgp_table_lock (struct bgp_table *);
>>>   extern void bgp_table_unlock (struct bgp_table *);
>>>   extern void bgp_table_finish (struct bgp_table **);
>>>
>>> -
>>>   /*
>>>    * bgp_node_from_rnode
>>>    *
>>> @@ -265,8 +264,6 @@ bgp_node_match_ipv4 (const struct bgp_table *table,
>>> struct in_addr *addr)
>>>                                                      addr));
>>>   }
>>>
>>> -#ifdef HAVE_IPV6
>>> -
>>>   /*
>>>    * bgp_node_match_ipv6
>>>    */
>>> @@ -277,8 +274,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)
>>>   {
>>> @@ -351,5 +346,4 @@ bgp_table_iter_started (bgp_table_iter_t * iter)
>>>   {
>>>     return route_table_iter_started (&iter->rt_iter);
>>>   }
>>> -
>>>   #endif /* _QUAGGA_BGP_TABLE_H */
>>> diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
>>> index a818fe7..3904a97 100644
>>> --- a/bgpd/bgp_vty.c
>>> +++ b/bgpd/bgp_vty.c
>>> @@ -80,10 +80,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;
>>> @@ -6617,7 +6615,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",
>>> @@ -6663,7 +6660,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,
>>> @@ -6693,7 +6689,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",
>>> @@ -6743,7 +6738,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,
>>> @@ -7195,7 +7189,6 @@ DEFUN (show_ip_bgp_vpnv4_rd_summary,
>>>     return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MPLS_VPN);
>>>   }
>>>
>>> -#ifdef HAVE_IPV6
>>>   DEFUN (show_bgp_summary,
>>>          show_bgp_summary_cmd,
>>>          "show bgp summary",
>>> @@ -7293,7 +7286,6 @@ DEFUN (show_ipv6_mbgp_summary,
>>>   {
>>>     return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST);
>>>   }
>>> -#endif /* HAVE_IPV6 */
>>>
>>>   const char *
>>>   afi_safi_print (afi_t afi, safi_t safi)
>>> @@ -7645,12 +7637,10 @@ 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]
>>>           || p->afc_recv[AFI_IP6][SAFI_MULTICAST]
>>> -#endif /* HAVE_IPV6 */
>>>           || p->afc_adv[AFI_IP][SAFI_MPLS_VPN]
>>>           || p->afc_recv[AFI_IP][SAFI_MPLS_VPN])
>>>         {
>>> @@ -7904,7 +7894,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);
>>> @@ -7914,7 +7903,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 */
>>>       }
>>>
>>>     /* Timer information. */
>>> @@ -8520,7 +8508,6 @@ ALIAS (show_bgp_instance_ipv4_safi_
>>> rsclient_summary,
>>>          "Information about Route Server Clients\n"
>>>          "Summary of all Route Server Clients\n")
>>>
>>> -#ifdef HAVE_IPV6
>>>   DEFUN (show_bgp_rsclient_summary,
>>>          show_bgp_rsclient_summary_cmd,
>>>          "show bgp rsclient summary",
>>> @@ -8565,6 +8552,7 @@ ALIAS (show_bgp_instance_rsclient_summary,
>>>          "Information about Route Server Clients\n"
>>>          "Summary of all Route Server Clients\n")
>>>
>>> +/* Redistribute VTY commands.  */
>>>   DEFUN (show_bgp_instance_ipv6_safi_rsclient_summary,
>>>          show_bgp_instance_ipv6_safi_rsclient_summary_cmd,
>>>          "show bgp view WORD ipv6 (unicast|multicast) rsclient summary",
>>> @@ -8600,10 +8588,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,
>>>          bgp_redistribute_ipv4_cmd,
>>>          "redistribute " QUAGGA_IP_REDIST_STR_BGPD,
>>> @@ -8816,7 +8800,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,
>>> @@ -9029,7 +9012,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,
>>> @@ -9836,10 +9818,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);
>>>
>>> @@ -9857,7 +9837,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);
>>> @@ -9869,7 +9848,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);
>>> @@ -9912,7 +9890,6 @@ bgp_vty_init (void)
>>>     install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_in_cmd);
>>>     install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_soft_in_cmd);
>>>     install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_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);
>>> @@ -9944,7 +9921,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);
>>> @@ -9975,7 +9951,6 @@ bgp_vty_init (void)
>>>     install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_out_cmd);
>>>     install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_soft_out_cmd);
>>>     install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_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);
>>> @@ -9997,7 +9972,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);
>>> @@ -10015,7 +9989,6 @@ bgp_vty_init (void)
>>>     install_element (ENABLE_NODE, &clear_ip_bgp_all_vpnv4_soft_cmd);
>>>     install_element (ENABLE_NODE, &clear_ip_bgp_peer_vpnv4_soft_cmd);
>>>     install_element (ENABLE_NODE, &clear_ip_bgp_as_vpnv4_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);
>>> @@ -10027,14 +10000,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);
>>> @@ -10043,7 +10014,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_ip_bgp_summary_cmd);
>>> @@ -10054,14 +10024,12 @@ bgp_vty_init (void)
>>>     install_element (VIEW_NODE, &show_bgp_instance_ipv4_safi_
>>> summary_cmd);
>>>     install_element (VIEW_NODE, &show_ip_bgp_vpnv4_all_summary_cmd);
>>>     install_element (VIEW_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd);
>>> -#ifdef HAVE_IPV6
>>>     install_element (VIEW_NODE, &show_bgp_summary_cmd);
>>>     install_element (VIEW_NODE, &show_bgp_instance_summary_cmd);
>>>     install_element (VIEW_NODE, &show_bgp_ipv6_summary_cmd);
>>>     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_ip_bgp_summary_cmd);
>>>     install_element (RESTRICTED_NODE, &show_ip_bgp_instance_summary_
>>> cmd);
>>>     install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_summary_cmd);
>>> @@ -10070,14 +10038,12 @@ bgp_vty_init (void)
>>>     install_element (RESTRICTED_NODE, &show_bgp_instance_ipv4_safi_
>>> summary_cmd);
>>>     install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_
>>> summary_cmd);
>>>     install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_summary_
>>> cmd);
>>> -#ifdef HAVE_IPV6
>>>     install_element (RESTRICTED_NODE, &show_bgp_summary_cmd);
>>>     install_element (RESTRICTED_NODE, &show_bgp_instance_summary_cmd);
>>>     install_element (RESTRICTED_NODE, &show_bgp_ipv6_summary_cmd);
>>>     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_ip_bgp_summary_cmd);
>>>     install_element (ENABLE_NODE, &show_ip_bgp_instance_summary_cmd);
>>>     install_element (ENABLE_NODE, &show_ip_bgp_ipv4_summary_cmd);
>>> @@ -10086,14 +10052,12 @@ bgp_vty_init (void)
>>>     install_element (ENABLE_NODE, &show_bgp_instance_ipv4_safi_
>>> summary_cmd);
>>>     install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_all_summary_cmd);
>>>     install_element (ENABLE_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd);
>>> -#ifdef HAVE_IPV6
>>>     install_element (ENABLE_NODE, &show_bgp_summary_cmd);
>>>     install_element (ENABLE_NODE, &show_bgp_instance_summary_cmd);
>>>     install_element (ENABLE_NODE, &show_bgp_ipv6_summary_cmd);
>>>     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_ip_bgp_neighbors_cmd);
>>> @@ -10122,7 +10086,6 @@ bgp_vty_init (void)
>>>     install_element (ENABLE_NODE, &show_ip_bgp_instance_neighbors_cmd);
>>>     install_element (ENABLE_NODE, &show_ip_bgp_instance_
>>> neighbors_peer_cmd);
>>>
>>> -#ifdef HAVE_IPV6
>>>     install_element (VIEW_NODE, &show_bgp_neighbors_cmd);
>>>     install_element (VIEW_NODE, &show_bgp_ipv6_neighbors_cmd);
>>>     install_element (VIEW_NODE, &show_bgp_neighbors_peer_cmd);
>>> @@ -10149,7 +10112,6 @@ bgp_vty_init (void)
>>>     install_element (VIEW_NODE, &show_ipv6_mbgp_summary_cmd);
>>>     install_element (ENABLE_NODE, &show_ipv6_bgp_summary_cmd);
>>>     install_element (ENABLE_NODE, &show_ipv6_mbgp_summary_cmd);
>>> -#endif /* HAVE_IPV6 */
>>>
>>>     /* "show ip bgp rsclient" commands. */
>>>     install_element (VIEW_NODE, &show_ip_bgp_rsclient_summary_cmd);
>>> @@ -10171,7 +10133,6 @@ bgp_vty_init (void)
>>>     install_element (ENABLE_NODE, &show_bgp_instance_ipv4_safi_
>>> rsclient_summary_cmd);
>>>     install_element (ENABLE_NODE, &show_bgp_ipv4_safi_rsclient_
>>> summary_cmd);
>>>
>>> -#ifdef HAVE_IPV6
>>>     install_element (VIEW_NODE, &show_bgp_rsclient_summary_cmd);
>>>     install_element (VIEW_NODE, &show_bgp_ipv6_rsclient_summary_cmd);
>>>     install_element (VIEW_NODE, &show_bgp_instance_rsclient_
>>> summary_cmd);
>>> @@ -10190,7 +10151,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_ip_bgp_paths_cmd);
>>> @@ -10217,7 +10177,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);
>>> @@ -10228,7 +10187,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 f18d916..e34488c 100644
>>> --- a/bgpd/bgp_zebra.c
>>> +++ b/bgpd/bgp_zebra.c
>>> @@ -299,7 +299,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)
>>> @@ -380,7 +379,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)
>>> @@ -433,7 +431,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)
>>>   {
>>> @@ -526,7 +523,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)
>>> @@ -566,7 +562,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))
>>> @@ -577,7 +572,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;
>>> @@ -587,7 +581,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);
>>>
>>> @@ -596,10 +589,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)
>>>       {
>>> @@ -656,7 +647,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;
>>>   }
>>>
>>> @@ -755,7 +745,6 @@ 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)
>>>       {
>>> @@ -824,7 +813,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
>>> @@ -883,7 +871,6 @@ 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)
>>>       {
>>> @@ -941,7 +928,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. */
>>> @@ -1091,10 +1077,8 @@ bgp_zebra_init (void)
>>>     zclient->ipv4_route_delete = zebra_read_ipv4;
>>>     zclient->interface_up = bgp_interface_up;<
>>
>> ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20140912/69dff3ae/attachment-0001.html>


More information about the Quagga-dev mailing list