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

Paul Jakma paul at jakma.org
Fri Sep 12 12:05:19 BST 2014


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")
>>
>> -#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;
>>     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 */
>>
>>     /* Interface related init. */
>>     if_init ();
>> diff --git a/bgpd/bgp_zebra.h b/bgpd/bgp_zebra.h
>> index 8099193..6aeba25 100644
>> --- a/bgpd/bgp_zebra.h
>> +++ b/bgpd/bgp_zebra.h
>> @@ -43,9 +43,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 eae803d..9bd9283 100644
>> --- a/bgpd/bgpd.h
>> +++ b/bgpd/bgpd.h
>> @@ -202,10 +202,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.  */
>> diff --git a/configure.ac b/configure.ac
>> index f1df482..10d7646 100755
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -198,8 +198,6 @@ AC_ARG_WITH(pkg-git-version,
>>   	[ test "x$withval" != "xno" && with_pkg_git_version="yes" ])
>>   AC_ARG_ENABLE(vtysh,
>>   [  --enable-vtysh          include integrated vty shell for Quagga])
>> -AC_ARG_ENABLE(ipv6,
>> -[  --disable-ipv6          turn off IPv6 related features and daemons])
>>   AC_ARG_ENABLE(doc,
>>   [  --disable-doc           do not build docs])
>>   AC_ARG_ENABLE(zebra,
>> @@ -1099,18 +1097,12 @@ dnl ----------
>>   dnl IPv6 check
>>   dnl ----------
>>   AC_MSG_CHECKING(whether does this OS have IPv6 stack)
>> -if test "${enable_ipv6}" = "no"; then
>> -  AC_MSG_RESULT(disabled)
>> -else
>>   dnl ----------
>>   dnl INRIA IPv6
>>   dnl ----------
>>     if grep IPV6_INRIA_VERSION /usr/include/netinet/in.h >/dev/null 2>&1; then
>>       zebra_cv_ipv6=yes
>> -    AC_DEFINE(HAVE_IPV6,1,INRIA IPv6)
>>       AC_DEFINE(INRIA_IPV6,1,INRIA IPv6)
>> -    RIPNGD="ripngd"
>> -    OSPF6D="ospf6d"
>>       LIB_IPV6=""
>>       AC_MSG_RESULT(INRIA IPv6)
>>   dnl ---------
>> @@ -1118,10 +1110,7 @@ dnl KAME IPv6
>>   dnl ---------
>>     elif grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then
>>       zebra_cv_ipv6=yes
>> -    AC_DEFINE(HAVE_IPV6,1,KAME IPv6)
>>       AC_DEFINE(KAME,1,KAME IPv6)
>> -    RIPNGD="ripngd"
>> -    OSPF6D="ospf6d"
>>       if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
>>         LIB_IPV6="-L/usr/local/v6/lib -linet6"
>>       fi
>> @@ -1133,11 +1122,8 @@ dnl  It is not used by Kheops
>>   dnl -------------------------
>>     elif grep MUSICA /usr/include6/netinet6/in6.h >/dev/null 2>&1; then
>>       zebra_cv_ipv6=yes
>> -    AC_DEFINE(HAVE_IPV6,1,Musicia IPv6)
>>       AC_DEFINE(MUSICA,1,Musica IPv6 stack)
>>       AC_DEFINE(KAME,1,KAME IPv6 stack)
>> -    RIPNGD="ripngd"
>> -    OSPF6D="ospf6d"
>>       if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
>>         LIB_IPV6="-L/usr/local/v6/lib -linet6"
>>       fi
>> @@ -1147,10 +1133,7 @@ dnl NRL check
>>   dnl ---------
>>     elif grep NRL /usr/include/netinet6/in6.h >/dev/null 2>&1; then
>>       zebra_cv_ipv6=yes
>> -    AC_DEFINE(HAVE_IPV6,1,NRL IPv6)
>>       AC_DEFINE(NRL,1,NRL)
>> -    RIPNGD="ripngd"
>> -    OSPF6D="ospf6d"
>>       if test x"$opsys" = x"bsdi";then
>>         AC_DEFINE(BSDI_NRL,,BSDI)
>>         AC_MSG_RESULT(BSDI_NRL)
>> @@ -1162,10 +1145,7 @@ dnl Solaris 9, 10 and potentially higher
>>   dnl ------------------------------------
>>     elif test x"$opsys" = x"sol8"; then
>>       zebra_cv_ipv6=yes;
>> -    AC_DEFINE(HAVE_IPV6, 1, IPv6)
>>       AC_DEFINE(SOLARIS_IPV6, 1, Solaris IPv6)
>> -    RIPNGD="ripngd"
>> -    OSPF6D="ospf6d"
>>       AC_MSG_RESULT(Solaris IPv6)
>>   dnl ----------
>>   dnl Linux IPv6
>> @@ -1215,8 +1195,6 @@ dnl ----------
>>          AC_MSG_RESULT(yes)],
>>         AC_MSG_RESULT(no)
>>       )
>> -    RIPNGD="ripngd"
>> -    OSPF6D="ospf6d"
>>       if test "$glibc" != "yes"; then
>>         if test x`ls /usr/inet6/lib/libinet6.a 2>/dev/null` != x;then
>>            INCLUDES="-I/usr/inet6/include"
>> @@ -1231,19 +1209,16 @@ dnl -----------------------
>>     LIBS="$LIB_IPV6 $LIBS"
>>     AC_SUBST(LIB_IPV6)
>>
>> -  if test x"$RIPNGD" = x""; then
>> -    AC_MSG_RESULT(IPv4 only)
>> +  if test x"$zebra_cv_ipv6" != x"yes"; then
>> +    AC_MSG_ERROR(IPv6 API support is required)
>>     fi
>> -fi
>>
>>   dnl ------------------
>>   dnl IPv6 header checks
>>   dnl ------------------
>> -if test "x${zebra_cv_ipv6}" = "xyes"; then
>>   AC_CHECK_HEADERS([netinet6/in6.h netinet/in6_var.h netinet/icmp6.h \
>>   	netinet6/in6_var.h netinet6/nd6.h], [], [],
>>   	QUAGGA_INCLUDES)
>> -fi
>>
>>   m4_define([QUAGGA_INCLUDES],dnl
>>   QUAGGA_INCLUDES
>> diff --git a/lib/command.c b/lib/command.c
>> index 1087ceb..49b3545 100644
>> --- a/lib/command.c
>> +++ b/lib/command.c
>> @@ -942,7 +942,6 @@ cmd_ipv4_prefix_match (const char *str)
>>   #define STATE_SLASH		6
>>   #define STATE_MASK		7
>>
>> -#ifdef HAVE_IPV6
>>
>>   static enum match_type
>>   cmd_ipv6_match (const char *str)
>> @@ -1104,7 +1103,6 @@ cmd_ipv6_prefix_match (const char *str)
>>     return exact_match;
>>   }
>>
>> -#endif /* HAVE_IPV6  */
>>
>>   #define DECIMAL_STRLEN_MAX 10
>>
>> @@ -1179,7 +1177,6 @@ cmd_word_match(struct cmd_token *token,
>>         if (cmd_range_match(str, word))
>>           return range_match;
>>       }
>> -#ifdef HAVE_IPV6
>>     else if (CMD_IPV6(str))
>>       {
>>         match_type = cmd_ipv6_match(word);
>> @@ -1194,7 +1191,6 @@ cmd_word_match(struct cmd_token *token,
>>             || (filter == FILTER_STRICT && match_type == exact_match))
>>           return ipv6_prefix_match;
>>       }
>> -#endif /* HAVE_IPV6 */
>>     else if (CMD_IPV4(str))
>>       {
>>         match_type = cmd_ipv4_match(word);
>> @@ -1876,7 +1872,6 @@ is_cmd_ambiguous (vector cmd_vector,
>>   		      match++;
>>   		    }
>>   		  break;
>> -#ifdef HAVE_IPV6
>>   		case ipv6_match:
>>   		  if (CMD_IPV6 (str))
>>   		    match++;
>> @@ -1890,7 +1885,6 @@ is_cmd_ambiguous (vector cmd_vector,
>>   		      match++;
>>   		    }
>>   		  break;
>> -#endif /* HAVE_IPV6 */
>>   		case ipv4_match:
>>   		  if (CMD_IPV4 (str))
>>   		    match++;
>> @@ -1956,7 +1950,6 @@ cmd_entry_function_desc (const char *src, const char *dst)
>>   	return NULL;
>>       }
>>
>> -#ifdef HAVE_IPV6
>>     if (CMD_IPV6 (dst))
>>       {
>>         if (cmd_ipv6_match (src))
>> @@ -1972,7 +1965,6 @@ cmd_entry_function_desc (const char *src, const char *dst)
>>         else
>>   	return NULL;
>>       }
>> -#endif /* HAVE_IPV6 */
>>
>>     if (CMD_IPV4 (dst))
>>       {
>> diff --git a/lib/command.h b/lib/command.h
>> index 8dc50d0..6d914c1 100644
>> --- a/lib/command.h
>> +++ b/lib/command.h
>> @@ -487,21 +487,12 @@ struct cmd_token
>>
>>   /* IPv4 only machine should not accept IPv6 address for peer's IP
>>      address.  So we replace VTY command string like below. */
>> -#ifdef HAVE_IPV6
>>   #define NEIGHBOR_CMD       "neighbor (A.B.C.D|X:X::X:X) "
>>   #define NO_NEIGHBOR_CMD    "no neighbor (A.B.C.D|X:X::X:X) "
>>   #define NEIGHBOR_ADDR_STR  "Neighbor address\nIPv6 address\n"
>>   #define NEIGHBOR_CMD2      "neighbor (A.B.C.D|X:X::X:X|WORD) "
>>   #define NO_NEIGHBOR_CMD2   "no neighbor (A.B.C.D|X:X::X:X|WORD) "
>>   #define NEIGHBOR_ADDR_STR2 "Neighbor address\nNeighbor IPv6 address\nNeighbor tag\n"
>> -#else
>> -#define NEIGHBOR_CMD       "neighbor A.B.C.D "
>> -#define NO_NEIGHBOR_CMD    "no neighbor A.B.C.D "
>> -#define NEIGHBOR_ADDR_STR  "Neighbor address\n"
>> -#define NEIGHBOR_CMD2      "neighbor (A.B.C.D|WORD) "
>> -#define NO_NEIGHBOR_CMD2   "no neighbor (A.B.C.D|WORD) "
>> -#define NEIGHBOR_ADDR_STR2 "Neighbor address\nNeighbor tag\n"
>> -#endif /* HAVE_IPV6 */
>>
>>   /* Prototypes. */
>>   extern void install_node (struct cmd_node *, int (*) (struct vty *));
>> diff --git a/lib/filter.c b/lib/filter.c
>> index 96605c7..cddc380 100644
>> --- a/lib/filter.c
>> +++ b/lib/filter.c
>> @@ -100,7 +100,6 @@ static struct access_master access_master_ipv4 =
>>     NULL,
>>   };
>>
>> -#ifdef HAVE_IPV6
>>   /* Static structure for IPv6 access_list's master. */
>>   static struct access_master access_master_ipv6 =
>>   {
>> @@ -109,17 +108,13 @@ static struct access_master access_master_ipv6 =
>>     NULL,
>>     NULL,
>>   };
>> -#endif /* HAVE_IPV6 */
>> -
>>   static struct access_master *
>>   access_master_get (afi_t afi)
>>   {
>>     if (afi == AFI_IP)
>>       return &access_master_ipv4;
>> -#ifdef HAVE_IPV6
>>     else if (afi == AFI_IP6)
>>       return &access_master_ipv6;
>> -#endif /* HAVE_IPV6 */
>>     return NULL;
>>   }
>>
>> @@ -429,9 +424,7 @@ void
>>   access_list_add_hook (void (*func) (struct access_list *access))
>>   {
>>     access_master_ipv4.add_hook = func;
>> -#ifdef HAVE_IPV6
>>     access_master_ipv6.add_hook = func;
>> -#endif /* HAVE_IPV6 */
>>   }
>>
>>   /* Delete hook function. */
>> @@ -439,9 +432,7 @@ void
>>   access_list_delete_hook (void (*func) (struct access_list *access))
>>   {
>>     access_master_ipv4.delete_hook = func;
>> -#ifdef HAVE_IPV6
>>     access_master_ipv6.delete_hook = func;
>> -#endif /* HAVE_IPV6 */
>>   }
>>
>>   /* Add new filter to the end of specified access_list. */
>> @@ -1186,7 +1177,6 @@ filter_set_zebra (struct vty *vty, const char *name_str, const char *type_str,
>>   	  return CMD_WARNING;
>>   	}
>>       }
>> -#ifdef HAVE_IPV6
>>     else if (afi == AFI_IP6)
>>       {
>>         ret = str2prefix_ipv6 (prefix_str, (struct prefix_ipv6 *) &p);
>> @@ -1197,7 +1187,6 @@ filter_set_zebra (struct vty *vty, const char *name_str, const char *type_str,
>>   		   return CMD_WARNING;
>>   	}
>>       }
>> -#endif /* HAVE_IPV6 */
>>     else
>>       return CMD_WARNING;
>>
>> @@ -1401,7 +1390,6 @@ ALIAS (no_access_list_remark,
>>          "Access list entry comment\n"
>>          "Comment up to 100 characters\n")
>>
>> -#ifdef HAVE_IPV6
>>   DEFUN (ipv6_access_list,
>>          ipv6_access_list_cmd,
>>          "ipv6 access-list WORD (deny|permit) X:X::X:X/M",
>> @@ -1562,7 +1550,6 @@ ALIAS (no_ipv6_access_list_remark,
>>          "IPv6 zebra access-list\n"
>>          "Access list entry comment\n"
>>          "Comment up to 100 characters\n")
>> -#endif /* HAVE_IPV6 */
>>
>>   void config_write_access_zebra (struct vty *, struct filter *);
>>   void config_write_access_cisco (struct vty *, struct filter *);
>> @@ -1699,7 +1686,6 @@ DEFUN (show_ip_access_list_name,
>>     return filter_show (vty, argv[0], AFI_IP);
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   DEFUN (show_ipv6_access_list,
>>          show_ipv6_access_list_cmd,
>>          "show ipv6 access-list",
>> @@ -1720,7 +1706,6 @@ DEFUN (show_ipv6_access_list_name,
>>   {
>>     return filter_show (vty, argv[0], AFI_IP6);
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   void
>>   config_write_access_cisco (struct vty *vty, struct filter *mfilter)
>> @@ -1952,7 +1937,6 @@ access_list_init_ipv4 (void)
>>     install_element (CONFIG_NODE, &no_access_list_remark_arg_cmd);
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   static struct cmd_node access_ipv6_node =
>>   {
>>     ACCESS_IPV6_NODE,
>> @@ -2015,22 +1999,17 @@ access_list_init_ipv6 (void)
>>     install_element (CONFIG_NODE, &no_ipv6_access_list_remark_cmd);
>>     install_element (CONFIG_NODE, &no_ipv6_access_list_remark_arg_cmd);
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   void
>>   access_list_init ()
>>   {
>>     access_list_init_ipv4 ();
>> -#ifdef HAVE_IPV6
>>     access_list_init_ipv6();
>> -#endif /* HAVE_IPV6 */
>>   }
>>
>>   void
>>   access_list_reset ()
>>   {
>>     access_list_reset_ipv4 ();
>> -#ifdef HAVE_IPV6
>>     access_list_reset_ipv6();
>> -#endif /* HAVE_IPV6 */
>>   }
>> diff --git a/lib/if.c b/lib/if.c
>> index 18e2fb3..16861eb 100644
>> --- a/lib/if.c
>> +++ b/lib/if.c
>> @@ -452,20 +452,11 @@ if_flag_dump (unsigned long flag)
>>   static void
>>   if_dump (const struct interface *ifp)
>>   {
>> -  struct listnode *node;
>> -  struct connected *c;
>> -
>> -  for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, c))
>> -    zlog_info ("Interface %s index %d metric %d mtu %d "
>> -#ifdef HAVE_IPV6
>> -               "mtu6 %d "
>> -#endif /* HAVE_IPV6 */
>> -               "%s",
>> -               ifp->name, ifp->ifindex, ifp->metric, ifp->mtu,
>> -#ifdef HAVE_IPV6
>> -               ifp->mtu6,
>> -#endif /* HAVE_IPV6 */
>> -               if_flag_dump (ifp->flags));
>> +  zlog_info ("Interface %s index %d metric %d mtu %d "
>> +             "mtu6 %d %s",
>> +	     ifp->name, ifp->ifindex, ifp->metric, ifp->mtu,
>> +	     ifp->mtu6,
>> +	     if_flag_dump (ifp->flags));
>>   }
>>
>>   /* Interface printing for all interface. */
>> @@ -700,11 +691,9 @@ connected_same_prefix (struct prefix *p1, struct prefix *p2)
>>         if (p1->family == AF_INET &&
>>   	  IPV4_ADDR_SAME (&p1->u.prefix4, &p2->u.prefix4))
>>   	return 1;
>> -#ifdef HAVE_IPV6
>>         if (p1->family == AF_INET6 &&
>>   	  IPV6_ADDR_SAME (&p1->u.prefix6, &p2->u.prefix6))
>>   	return 1;
>> -#endif /* HAVE_IPV6 */
>>       }
>>     return 0;
>>   }
>> diff --git a/lib/plist.c b/lib/plist.c
>> index 7416ebd..6514990 100644
>> --- a/lib/plist.c
>> +++ b/lib/plist.c
>> @@ -89,7 +89,6 @@ static struct prefix_master prefix_master_ipv4 =
>>     NULL,
>>   };
>>
>> -#ifdef HAVE_IPV6
>>   /* Static structure of IPv6 prefix-list's master. */
>>   static struct prefix_master prefix_master_ipv6 =
>>   {
>> @@ -99,7 +98,6 @@ static struct prefix_master prefix_master_ipv6 =
>>     NULL,
>>     NULL,
>>   };
>> -#endif /* HAVE_IPV6*/
>>
>>   /* Static structure of BGP ORF prefix_list's master. */
>>   static struct prefix_master prefix_master_orf =
>> @@ -116,10 +114,8 @@ prefix_master_get (afi_t afi)
>>   {
>>     if (afi == AFI_IP)
>>       return &prefix_master_ipv4;
>> -#ifdef HAVE_IPV6
>>     else if (afi == AFI_IP6)
>>       return &prefix_master_ipv6;
>> -#endif /* HAVE_IPV6 */
>>     else if (afi == AFI_ORF_PREFIX)
>>       return &prefix_master_orf;
>>     return NULL;
>> @@ -359,9 +355,7 @@ void
>>   prefix_list_add_hook (void (*func) (struct prefix_list *plist))
>>   {
>>     prefix_master_ipv4.add_hook = func;
>> -#ifdef HAVE_IPV6
>>     prefix_master_ipv6.add_hook = func;
>> -#endif /* HAVE_IPV6 */
>>   }
>>
>>   /* Delete hook function. */
>> @@ -369,9 +363,7 @@ void
>>   prefix_list_delete_hook (void (*func) (struct prefix_list *plist))
>>   {
>>     prefix_master_ipv4.delete_hook = func;
>> -#ifdef HAVE_IPV6
>>     prefix_master_ipv6.delete_hook = func;
>> -#endif /* HAVE_IPVt6 */
>>   }
>>
>>   /* Calculate new sequential number. */
>> @@ -711,7 +703,6 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,
>>   	  return CMD_WARNING;
>>   	}
>>       }
>> -#ifdef HAVE_IPV6
>>     else if (afi == AFI_IP6)
>>       {
>>         if (strncmp ("any", prefix, strlen (prefix)) == 0)
>> @@ -730,7 +721,6 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,
>>   	  return CMD_WARNING;
>>   	}
>>       }
>> -#endif /* HAVE_IPV6 */
>>
>>     /* ge and le check. */
>>     if (genum && genum <= p.prefixlen)
>> @@ -850,7 +840,6 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,
>>   	  return CMD_WARNING;
>>   	}
>>       }
>> -#ifdef HAVE_IPV6
>>     else if (afi == AFI_IP6)
>>       {
>>         if (strncmp ("any", prefix, strlen (prefix)) == 0)
>> @@ -868,7 +857,6 @@ vty_prefix_list_uninstall (struct vty *vty, afi_t afi, const char *name,
>>   	  return CMD_WARNING;
>>   	}
>>       }
>> -#endif /* HAVE_IPV6 */
>>
>>     /* Lookup prefix entry. */
>>     pentry = prefix_list_entry_lookup(plist, &p, type, seqnum, lenum, genum);
>> @@ -1760,7 +1748,6 @@ DEFUN (clear_ip_prefix_list_name_prefix,
>>     return vty_clear_prefix_list (vty, AFI_IP, argv[0], argv[1]);
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   DEFUN (ipv6_prefix_list,
>>          ipv6_prefix_list_cmd,
>>          "ipv6 prefix-list WORD (deny|permit) (X:X::X:X/M|any)",
>> @@ -2354,7 +2341,6 @@ DEFUN (clear_ipv6_prefix_list_name_prefix,
>>   {
>>     return vty_clear_prefix_list (vty, AFI_IP6, argv[0], argv[1]);
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   /* Configuration write function. */
>>   static int
>> @@ -2730,7 +2716,6 @@ prefix_list_init_ipv4 (void)
>>     install_element (ENABLE_NODE, &clear_ip_prefix_list_name_prefix_cmd);
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   /* Prefix-list node. */
>>   static struct cmd_node prefix_ipv6_node =
>>   {
>> @@ -2838,23 +2823,18 @@ prefix_list_init_ipv6 (void)
>>     install_element (ENABLE_NODE, &clear_ipv6_prefix_list_name_cmd);
>>     install_element (ENABLE_NODE, &clear_ipv6_prefix_list_name_prefix_cmd);
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   void
>>   prefix_list_init ()
>>   {
>>     prefix_list_init_ipv4 ();
>> -#ifdef HAVE_IPV6
>>     prefix_list_init_ipv6 ();
>> -#endif /* HAVE_IPV6 */
>>   }
>>
>>   void
>>   prefix_list_reset ()
>>   {
>>     prefix_list_reset_ipv4 ();
>> -#ifdef HAVE_IPV6
>>     prefix_list_reset_ipv6 ();
>> -#endif /* HAVE_IPV6 */
>>     prefix_list_reset_orf ();
>>   }
>> diff --git a/lib/prefix.c b/lib/prefix.c
>> index dbfdc83..dc1fb41 100644
>> --- a/lib/prefix.c
>> +++ b/lib/prefix.c
>> @@ -193,10 +193,8 @@ afi2family (afi_t afi)
>>   {
>>     if (afi == AFI_IP)
>>       return AF_INET;
>> -#ifdef HAVE_IPV6
>>     else if (afi == AFI_IP6)
>>       return AF_INET6;
>> -#endif /* HAVE_IPV6 */
>>     return 0;
>>   }
>>
>> @@ -205,10 +203,8 @@ family2afi (int family)
>>   {
>>     if (family == AF_INET)
>>       return AFI_IP;
>> -#ifdef HAVE_IPV6
>>     else if (family == AF_INET6)
>>       return AFI_IP6;
>> -#endif /* HAVE_IPV6 */
>>     return 0;
>>   }
>>
>> @@ -250,10 +246,8 @@ prefix_copy (struct prefix *dest, const struct prefix *src)
>>
>>     if (src->family == AF_INET)
>>       dest->u.prefix4 = src->u.prefix4;
>> -#ifdef HAVE_IPV6
>>     else if (src->family == AF_INET6)
>>       dest->u.prefix6 = src->u.prefix6;
>> -#endif /* HAVE_IPV6 */
>>     else if (src->family == AF_UNSPEC)
>>       {
>>         dest->u.lp.id = src->u.lp.id;
>> @@ -283,11 +277,9 @@ prefix_same (const struct prefix *p1, const struct prefix *p2)
>>         if (p1->family == AF_INET)
>>   	if (IPV4_ADDR_SAME (&p1->u.prefix4.s_addr, &p2->u.prefix4.s_addr))
>>   	  return 1;
>> -#ifdef HAVE_IPV6
>>         if (p1->family == AF_INET6 )
>>   	if (IPV6_ADDR_SAME (&p1->u.prefix6.s6_addr, &p2->u.prefix6.s6_addr))
>>   	  return 1;
>> -#endif /* HAVE_IPV6 */
>>       }
>>     return 0;
>>   }
>> @@ -348,10 +340,8 @@ prefix_common_bits (const struct prefix *p1, const struct prefix *p2)
>>
>>     if (p1->family == AF_INET)
>>       length = IPV4_MAX_BYTELEN;
>> -#ifdef HAVE_IPV6
>>     if (p1->family == AF_INET6)
>>       length = IPV6_MAX_BYTELEN;
>> -#endif
>>     if (p1->family != p2->family || !length)
>>       return -1;
>>
>> @@ -375,10 +365,8 @@ prefix_family_str (const struct prefix *p)
>>   {
>>     if (p->family == AF_INET)
>>       return "inet";
>> -#ifdef HAVE_IPV6
>>     if (p->family == AF_INET6)
>>       return "inet6";
>> -#endif /* HAVE_IPV6 */
>>     return "unspec";
>>   }
>>
>> @@ -495,8 +483,6 @@ prefix_ipv4_any (const struct prefix_ipv4 *p)
>>     return (p->prefix.s_addr == 0 && p->prefixlen == 0);
>>   }
>>
>> -#ifdef HAVE_IPV6
>> -
>>   /* Allocate a new ip version 6 route */
>>   struct prefix_ipv6 *
>>   prefix_ipv6_new (void)
>> @@ -627,7 +613,6 @@ str2in6_addr (const char *str, struct in6_addr *addr)
>>         addr->s6_addr[i] = x & 0xff;
>>       }
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   void
>>   apply_mask (struct prefix *p)
>> @@ -637,11 +622,9 @@ apply_mask (struct prefix *p)
>>         case AF_INET:
>>           apply_mask_ipv4 ((struct prefix_ipv4 *)p);
>>           break;
>> -#ifdef HAVE_IPV6
>>         case AF_INET6:
>>           apply_mask_ipv6 ((struct prefix_ipv6 *)p);
>>           break;
>> -#endif /* HAVE_IPV6 */
>>         default:
>>           break;
>>       }
>> @@ -664,7 +647,6 @@ sockunion2prefix (const union sockunion *dest,
>>         p->prefixlen = ip_masklen (mask->sin.sin_addr);
>>         return (struct prefix *) p;
>>       }
>> -#ifdef HAVE_IPV6
>>     if (dest->sa.sa_family == AF_INET6)
>>       {
>>         struct prefix_ipv6 *p;
>> @@ -675,7 +657,6 @@ sockunion2prefix (const union sockunion *dest,
>>         memcpy (&p->prefix, &dest->sin6.sin6_addr, sizeof (struct in6_addr));
>>         return (struct prefix *) p;
>>       }
>> -#endif /* HAVE_IPV6 */
>>     return NULL;
>>   }
>>
>> @@ -693,7 +674,6 @@ sockunion2hostprefix (const union sockunion *su)
>>         p->prefixlen = IPV4_MAX_BITLEN;
>>         return (struct prefix *) p;
>>       }
>> -#ifdef HAVE_IPV6
>>     if (su->sa.sa_family == AF_INET6)
>>       {
>>         struct prefix_ipv6 *p;
>> @@ -704,7 +684,6 @@ sockunion2hostprefix (const union sockunion *su)
>>         memcpy (&p->prefix, &su->sin6.sin6_addr, sizeof (struct in6_addr));
>>         return (struct prefix *) p;
>>       }
>> -#endif /* HAVE_IPV6 */
>>     return NULL;
>>   }
>>
>> @@ -716,10 +695,8 @@ prefix2sockunion (const struct prefix *p, union sockunion *su)
>>     su->sa.sa_family = p->family;
>>     if (p->family == AF_INET)
>>       su->sin.sin_addr = p->u.prefix4;
>> -#ifdef HAVE_IPV6
>>     if (p->family == AF_INET6)
>>       memcpy (&su->sin6.sin6_addr, &p->u.prefix6, sizeof (struct in6_addr));
>> -#endif /* HAVE_IPV6 */
>>   }
>>
>>   int
>> @@ -730,11 +707,9 @@ prefix_blen (const struct prefix *p)
>>       case AF_INET:
>>         return IPV4_MAX_BYTELEN;
>>         break;
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         return IPV6_MAX_BYTELEN;
>>         break;
>> -#endif /* HAVE_IPV6 */
>>       }
>>     return 0;
>>   }
>> @@ -750,12 +725,10 @@ str2prefix (const char *str, struct prefix *p)
>>     if (ret)
>>       return ret;
>>
>> -#ifdef HAVE_IPV6
>>     /* Next we try to convert string to struct prefix_ipv6. */
>>     ret = str2prefix_ipv6 (str, (struct prefix_ipv6 *) p);
>>     if (ret)
>>       return ret;
>> -#endif /* HAVE_IPV6 */
>>
>>     return 0;
>>   }
>> @@ -893,7 +866,6 @@ netmask_str2prefix_str (const char *net_str, const char *mask_str,
>>     return 1;
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   /* Utility function for making IPv6 address string. */
>>   const char *
>>   inet6_ntoa (struct in6_addr addr)
>> @@ -903,4 +875,3 @@ inet6_ntoa (struct in6_addr addr)
>>     inet_ntop (AF_INET6, &addr, buf, INET6_ADDRSTRLEN);
>>     return buf;
>>   }
>> -#endif /* HAVE_IPV6 */
>> diff --git a/lib/prefix.h b/lib/prefix.h
>> index 45889e0..297f8f8 100644
>> --- a/lib/prefix.h
>> +++ b/lib/prefix.h
>> @@ -43,9 +43,7 @@ struct prefix
>>     {
>>       u_char prefix;
>>       struct in_addr prefix4;
>> -#ifdef HAVE_IPV6
>>       struct in6_addr prefix6;
>> -#endif /* HAVE_IPV6 */
>>       struct
>>       {
>>         struct in_addr id;
>> @@ -65,14 +63,12 @@ struct prefix_ipv4
>>   };
>>
>>   /* IPv6 prefix structure. */
>> -#ifdef HAVE_IPV6
>>   struct prefix_ipv6
>>   {
>>     u_char family;
>>     u_char prefixlen;
>>     struct in6_addr prefix __attribute__ ((aligned (8)));
>>   };
>> -#endif /* HAVE_IPV6 */
>>
>>   struct prefix_ls
>>   {
>> @@ -205,7 +201,6 @@ extern in_addr_t ipv4_broadcast_addr (in_addr_t hostaddr, int masklen);
>>
>>   extern int netmask_str2prefix_str (const char *, const char *, char *);
>>
>> -#ifdef HAVE_IPV6
>>   extern struct prefix_ipv6 *prefix_ipv6_new (void);
>>   extern void prefix_ipv6_free (struct prefix_ipv6 *);
>>   extern int str2prefix_ipv6 (const char *, struct prefix_ipv6 *);
>> @@ -220,8 +215,6 @@ extern void masklen2ip6 (const int, struct in6_addr *);
>>   extern void str2in6_addr (const char *, struct in6_addr *);
>>   extern const char *inet6_ntoa (struct in6_addr);
>>
>> -#endif /* HAVE_IPV6 */
>> -
>>   extern int all_digit (const char *);
>>
>>   static inline int ipv4_martian (struct in_addr *addr)
>> diff --git a/lib/smux.c b/lib/smux.c
>> index 70be492..34d1181 100644
>> --- a/lib/smux.c
>> +++ b/lib/smux.c
>> @@ -154,16 +154,10 @@ static int
>>   smux_socket (void)
>>   {
>>     int ret;
>> -#ifdef HAVE_IPV6
>>     struct addrinfo hints, *res0, *res;
>>     int gai;
>> -#else
>> -  struct sockaddr_in serv;
>> -  struct servent *sp;
>> -#endif
>>     int sock = 0;
>>
>> -#ifdef HAVE_IPV6
>>     memset(&hints, 0, sizeof(hints));
>>     hints.ai_family = PF_UNSPEC;
>>     hints.ai_socktype = SOCK_STREAM;
>> @@ -182,11 +176,7 @@ smux_socket (void)
>>       }
>>     for(res=res0; res; res=res->ai_next)
>>       {
>> -      if (res->ai_family != AF_INET
>> -#ifdef HAVE_IPV6
>> -	  && res->ai_family != AF_INET6
>> -#endif /* HAVE_IPV6 */
>> -	  )
>> +      if (res->ai_family != AF_INET && res->ai_family != AF_INET6)
>>   	continue;
>>
>>         sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
>> @@ -206,40 +196,7 @@ smux_socket (void)
>>     freeaddrinfo(res0);
>>     if (sock < 0)
>>       zlog_warn ("Can't connect to SNMP agent with SMUX");
>> -#else
>> -  sock = socket (AF_INET, SOCK_STREAM, 0);
>> -  if (sock < 0)
>> -    {
>> -      zlog_warn ("Can't make socket for SNMP");
>> -      return -1;
>> -    }
>> -
>> -  memset (&serv, 0, sizeof (struct sockaddr_in));
>> -  serv.sin_family = AF_INET;
>> -#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
>> -  serv.sin_len = sizeof (struct sockaddr_in);
>> -#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
>> -
>> -  sp = getservbyname ("smux", "tcp");
>> -  if (sp != NULL)
>> -    serv.sin_port = sp->s_port;
>> -  else
>> -    serv.sin_port = htons (SMUX_PORT_DEFAULT);
>> -
>> -  serv.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
>>
>> -  sockopt_reuseaddr (sock);
>> -  sockopt_reuseport (sock);
>> -
>> -  ret = connect (sock, (struct sockaddr *) &serv, sizeof (struct sockaddr_in));
>> -  if (ret < 0)
>> -    {
>> -      close (sock);
>> -      smux_sock = -1;
>> -      zlog_warn ("Can't connect to SNMP agent with SMUX");
>> -      return -1;
>> -    }
>> -#endif
>>     return sock;
>>   }
>>
>> diff --git a/lib/sockopt.c b/lib/sockopt.c
>> index be22827..df993bf 100644
>> --- a/lib/sockopt.c
>> +++ b/lib/sockopt.c
>> @@ -81,7 +81,6 @@ getsockopt_cmsg_data (struct msghdr *msgh, int level, int type)
>>     return NULL;
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   /* Set IPv6 packet info to the socket. */
>>   int
>>   setsockopt_ipv6_pktinfo (int sock, int val)
>> @@ -193,7 +192,6 @@ setsockopt_ipv6_tclass(int sock, int tclass)
>>   #endif
>>     return ret;
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   /*
>>    * Process multicast socket options for IPv4 in an OS-dependent manner.
>> @@ -390,11 +388,9 @@ setsockopt_ifindex (int af, int sock, int val)
>>         case AF_INET:
>>           ret = setsockopt_ipv4_ifindex (sock, val);
>>           break;
>> -#ifdef HAVE_IPV6
>>         case AF_INET6:
>>           ret = setsockopt_ipv6_pktinfo (sock, val);
>>           break;
>> -#endif
>>         default:
>>           zlog_warn ("setsockopt_ifindex: unknown address family %d", af);
>>       }
>> @@ -481,11 +477,9 @@ getsockopt_ifindex (int af, struct msghdr *msgh)
>>         case AF_INET:
>>           return (getsockopt_ipv4_ifindex (msgh));
>>           break;
>> -#ifdef HAVE_IPV6
>>         case AF_INET6:
>>           return (getsockopt_ipv6_ifindex (msgh));
>>           break;
>> -#endif
>>         default:
>>           zlog_warn ("getsockopt_ifindex: unknown address family %d", af);
>>           return 0;
>> @@ -576,7 +570,6 @@ sockopt_tcp_signature (int sock, union sockunion *su, const char *password)
>>             return 0;
>>           }
>>
>> -#ifdef HAVE_IPV6
>>         /* If this does not work, then all users of this sockopt will need to
>>          * differentiate between IPv4 and IPv6, and keep seperate sockets for
>>          * each.
>> @@ -593,7 +586,6 @@ sockopt_tcp_signature (int sock, union sockunion *su, const char *password)
>>              su2->sin6.sin6_addr.s6_addr32[2] = htonl(0xffff);
>>              memcpy (&su2->sin6.sin6_addr.s6_addr32[3], &su->sin.sin_addr, 4);
>>           }
>> -#endif
>>       }
>>
>>     memset (&md5sig, 0, sizeof (md5sig));
>> diff --git a/lib/sockopt.h b/lib/sockopt.h
>> index aced6d4..a435bce 100644
>> --- a/lib/sockopt.h
>> +++ b/lib/sockopt.h
>> @@ -28,7 +28,6 @@ extern int setsockopt_so_recvbuf (int sock, int size);
>>   extern int setsockopt_so_sendbuf (const int sock, int size);
>>   extern int getsockopt_so_sendbuf (const int sock);
>>
>> -#ifdef HAVE_IPV6
>>   extern int setsockopt_ipv6_pktinfo (int, int);
>>   extern int setsockopt_ipv6_checksum (int, int);
>>   extern int setsockopt_ipv6_multicast_hops (int, int);
>> @@ -36,13 +35,7 @@ extern int setsockopt_ipv6_unicast_hops (int, int);
>>   extern int setsockopt_ipv6_hoplimit (int, int);
>>   extern int setsockopt_ipv6_multicast_loop (int, int);
>>   extern int setsockopt_ipv6_tclass (int, int);
>> -#endif /* HAVE_IPV6 */
>>
>> -/*
>> - * It is OK to reference in6_pktinfo here without a protecting #if
>> - * because this macro will only be used #if HAVE_IPV6, and in6_pktinfo
>> - * is not optional for HAVE_IPV6.
>> - */
>>   #define SOPT_SIZE_CMSG_PKTINFO_IPV6() (sizeof (struct in6_pktinfo));
>>
>>   /*
>> diff --git a/lib/sockunion.c b/lib/sockunion.c
>> index 5dcf725..53e05ad 100644
>> --- a/lib/sockunion.c
>> +++ b/lib/sockunion.c
>> @@ -123,11 +123,9 @@ inet_sutop (union sockunion *su, char *str)
>>       case AF_INET:
>>         inet_ntop (AF_INET, &su->sin.sin_addr, str, INET_ADDRSTRLEN);
>>         break;
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         inet_ntop (AF_INET6, &su->sin6.sin6_addr, str, INET6_ADDRSTRLEN);
>>         break;
>> -#endif /* HAVE_IPV6 */
>>       }
>>     return str;
>>   }
>> @@ -148,7 +146,6 @@ str2sockunion (const char *str, union sockunion *su)
>>   #endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
>>         return 0;
>>       }
>> -#ifdef HAVE_IPV6
>>     ret = inet_pton (AF_INET6, str, &su->sin6.sin6_addr);
>>     if (ret > 0)			/* Valid IPv6 address format. */
>>       {
>> @@ -158,7 +155,6 @@ str2sockunion (const char *str, union sockunion *su)
>>   #endif /* SIN6_LEN */
>>         return 0;
>>       }
>> -#endif /* HAVE_IPV6 */
>>     return -1;
>>   }
>>
>> @@ -167,10 +163,8 @@ sockunion2str (union sockunion *su, char *buf, size_t len)
>>   {
>>     if  (su->sa.sa_family == AF_INET)
>>       return inet_ntop (AF_INET, &su->sin.sin_addr, buf, len);
>> -#ifdef HAVE_IPV6
>>     else if (su->sa.sa_family == AF_INET6)
>>       return inet_ntop (AF_INET6, &su->sin6.sin6_addr, buf, len);
>> -#endif /* HAVE_IPV6 */
>>     return NULL;
>>   }
>>
>> @@ -192,7 +186,6 @@ sockunion_normalise_mapped (union sockunion *su)
>>   {
>>     struct sockaddr_in sin;
>>
>> -#ifdef HAVE_IPV6
>>     if (su->sa.sa_family == AF_INET6
>>         && IN6_IS_ADDR_V4MAPPED (&su->sin6.sin6_addr))
>>       {
>> @@ -202,7 +195,6 @@ sockunion_normalise_mapped (union sockunion *su)
>>         memcpy (&sin.sin_addr, ((char *)&su->sin6.sin6_addr) + 12, 4);
>>         memcpy (su, &sin, sizeof (struct sockaddr_in));
>>       }
>> -#endif /* HAVE_IPV6 */
>>   }
>>
>>   /* Return socket of sockunion. */
>> @@ -247,11 +239,9 @@ sockunion_sizeof (union sockunion *su)
>>       case AF_INET:
>>         ret = sizeof (struct sockaddr_in);
>>         break;
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         ret = sizeof (struct sockaddr_in6);
>>         break;
>> -#endif /* AF_INET6 */
>>       }
>>     return ret;
>>   }
>> @@ -265,11 +255,9 @@ sockunion_log (union sockunion *su, char *buf, size_t len)
>>       case AF_INET:
>>         return inet_ntop(AF_INET, &su->sin.sin_addr, buf, len);
>>
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         return inet_ntop(AF_INET6, &(su->sin6.sin6_addr), buf, len);
>>         break;
>> -#endif /* HAVE_IPV6 */
>>
>>       default:
>>         snprintf (buf, len, "af_unknown %d ", su->sa.sa_family);
>> @@ -296,25 +284,13 @@ sockunion_connect (int fd, union sockunion *peersu, unsigned short port,
>>       case AF_INET:
>>         su.sin.sin_port = port;
>>         break;
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         su.sin6.sin6_port  = port;
>> -#ifdef KAME
>> -      if (IN6_IS_ADDR_LINKLOCAL(&su.sin6.sin6_addr) && ifindex)
>> -	{
>>   #ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
>> -	  /* su.sin6.sin6_scope_id = ifindex; */
>> -#ifdef MUSICA
>> -	  su.sin6.sin6_scope_id = ifindex;
>> -#endif
>> +      if (IN6_IS_ADDR_LINKLOCAL(&su.sin6.sin6_addr) && ifindex)
>> +        su.sin6.sin6_scope_id = ifindex;
>>   #endif /* HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID */
>> -#ifndef MUSICA
>> -	  SET_IN6_LINKLOCAL_IFINDEX (su.sin6.sin6_addr, ifindex);
>> -#endif
>> -	}
>> -#endif /* KAME */
>>         break;
>> -#endif /* HAVE_IPV6 */
>>       }
>>
>>     /* Make socket non-block. */
>> @@ -384,7 +360,6 @@ sockunion_bind (int sock, union sockunion *su, unsigned short port,
>>         if (su_addr == NULL)
>>   	sockunion2ip (su) = htonl (INADDR_ANY);
>>       }
>> -#ifdef HAVE_IPV6
>>     else if (su->sa.sa_family == AF_INET6)
>>       {
>>         size = sizeof (struct sockaddr_in6);
>> @@ -393,16 +368,8 @@ sockunion_bind (int sock, union sockunion *su, unsigned short port,
>>         su->sin6.sin6_len = size;
>>   #endif /* SIN6_LEN */
>>         if (su_addr == NULL)
>> -	{
>> -#if defined(LINUX_IPV6) || defined(NRL)
>> -	  memset (&su->sin6.sin6_addr, 0, sizeof (struct in6_addr));
>> -#else
>> -	  su->sin6.sin6_addr = in6addr_any;
>> -#endif /* LINUX_IPV6 */
>> -	}
>> +        memset (&su->sin6.sin6_addr, 0, sizeof (struct in6_addr));
>>       }
>> -#endif /* HAVE_IPV6 */
>> -
>>
>>     ret = bind (sock, (struct sockaddr *)su, size);
>>     if (ret < 0)
>> @@ -469,7 +436,6 @@ sockopt_ttl (int family, int sock, int ttl)
>>         return 0;
>>       }
>>   #endif /* IP_TTL */
>> -#ifdef HAVE_IPV6
>>     if (family == AF_INET6)
>>       {
>>         ret = setsockopt (sock, IPPROTO_IPV6, IPV6_UNICAST_HOPS,
>> @@ -482,7 +448,6 @@ sockopt_ttl (int family, int sock, int ttl)
>>   	}
>>         return 0;
>>       }
>> -#endif /* HAVE_IPV6 */
>>     return 0;
>>   }
>>
>> @@ -531,7 +496,6 @@ sockopt_v6only (int family, int sock)
>>   {
>>     int ret, on = 1;
>>
>> -#ifdef HAVE_IPV6
>>   #ifdef IPV6_V6ONLY
>>     if (family == AF_INET6)
>>       {
>> @@ -546,7 +510,6 @@ sockopt_v6only (int family, int sock)
>>         return 0;
>>       }
>>   #endif /* IPV6_V6ONLY */
>> -#endif /* HAVE_IPV6 */
>>     return 0;
>>   }
>>
>> @@ -565,12 +528,10 @@ sockunion_same (union sockunion *su1, union sockunion *su2)
>>         ret = memcmp (&su1->sin.sin_addr, &su2->sin.sin_addr,
>>   		    sizeof (struct in_addr));
>>         break;
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         ret = memcmp (&su1->sin6.sin6_addr, &su2->sin6.sin6_addr,
>>   		    sizeof (struct in6_addr));
>>         break;
>> -#endif /* HAVE_IPV6 */
>>       }
>>     if (ret == 0)
>>       return 1;
>> @@ -588,9 +549,7 @@ sockunion_getsockname (int fd)
>>     {
>>       struct sockaddr sa;
>>       struct sockaddr_in sin;
>> -#ifdef HAVE_IPV6
>>       struct sockaddr_in6 sin6;
>> -#endif /* HAVE_IPV6 */
>>       char tmp_buffer[128];
>>     } name;
>>     union sockunion *su;
>> @@ -612,7 +571,6 @@ sockunion_getsockname (int fd)
>>         memcpy (su, &name, sizeof (struct sockaddr_in));
>>         return su;
>>       }
>> -#ifdef HAVE_IPV6
>>     if (name.sa.sa_family == AF_INET6)
>>       {
>>         su = XCALLOC (MTYPE_SOCKUNION, sizeof (union sockunion));
>> @@ -620,7 +578,6 @@ sockunion_getsockname (int fd)
>>         sockunion_normalise_mapped (su);
>>         return su;
>>       }
>> -#endif /* HAVE_IPV6 */
>>     return NULL;
>>   }
>>
>> @@ -634,9 +591,7 @@ sockunion_getpeername (int fd)
>>     {
>>       struct sockaddr sa;
>>       struct sockaddr_in sin;
>> -#ifdef HAVE_IPV6
>>       struct sockaddr_in6 sin6;
>> -#endif /* HAVE_IPV6 */
>>       char tmp_buffer[128];
>>     } name;
>>     union sockunion *su;
>> @@ -657,7 +612,6 @@ sockunion_getpeername (int fd)
>>         memcpy (su, &name, sizeof (struct sockaddr_in));
>>         return su;
>>       }
>> -#ifdef HAVE_IPV6
>>     if (name.sa.sa_family == AF_INET6)
>>       {
>>         su = XCALLOC (MTYPE_SOCKUNION, sizeof (union sockunion));
>> @@ -665,7 +619,6 @@ sockunion_getpeername (int fd)
>>         sockunion_normalise_mapped (su);
>>         return su;
>>       }
>> -#endif /* HAVE_IPV6 */
>>     return NULL;
>>   }
>>
>> @@ -681,7 +634,6 @@ sockunion_print (union sockunion *su)
>>       case AF_INET:
>>         printf ("%s\n", inet_ntoa (su->sin.sin_addr));
>>         break;
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         {
>>   	char buf [SU_ADDRSTRLEN];
>> @@ -690,7 +642,6 @@ sockunion_print (union sockunion *su)
>>   				 buf, sizeof (buf)));
>>         }
>>         break;
>> -#endif /* HAVE_IPV6 */
>>
>>   #ifdef AF_LINK
>>       case AF_LINK:
>> @@ -708,7 +659,6 @@ sockunion_print (union sockunion *su)
>>       }
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   static int
>>   in6addr_cmp (struct in6_addr *addr1, struct in6_addr *addr2)
>>   {
>> @@ -727,7 +677,6 @@ in6addr_cmp (struct in6_addr *addr1, struct in6_addr *addr2)
>>       }
>>     return 0;
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   int
>>   sockunion_cmp (union sockunion *su1, union sockunion *su2)
>> @@ -746,10 +695,8 @@ sockunion_cmp (union sockunion *su1, union sockunion *su2)
>>         else
>>   	return -1;
>>       }
>> -#ifdef HAVE_IPV6
>>     if (su1->sa.sa_family == AF_INET6)
>>       return in6addr_cmp (&su1->sin6.sin6_addr, &su2->sin6.sin6_addr);
>> -#endif /* HAVE_IPV6 */
>>     return 0;
>>   }
>>
>> diff --git a/lib/sockunion.h b/lib/sockunion.h
>> index b9f3514..abd8620 100644
>> --- a/lib/sockunion.h
>> +++ b/lib/sockunion.h
>> @@ -42,9 +42,7 @@ union sockunion
>>   {
>>     struct sockaddr sa;
>>     struct sockaddr_in sin;
>> -#ifdef HAVE_IPV6
>>     struct sockaddr_in6 sin6;
>> -#endif /* HAVE_IPV6 */
>>   };
>>
>>   enum connect_result
>> @@ -55,11 +53,7 @@ enum connect_result
>>   };
>>
>>   /* Default address family. */
>> -#ifdef HAVE_IPV6
>>   #define AF_INET_UNION AF_INET6
>> -#else
>> -#define AF_INET_UNION AF_INET
>> -#endif
>>
>>   /* Sockunion address string length.  Same as INET6_ADDRSTRLEN. */
>>   #define SU_ADDRSTRLEN 46
>> diff --git a/lib/table.c b/lib/table.c
>> index 220e9b8..2020597 100644
>> --- a/lib/table.c
>> +++ b/lib/table.c
>> @@ -247,7 +247,6 @@ route_node_match_ipv4 (const struct route_table *table,
>>     return route_node_match (table, (struct prefix *) &p);
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   struct route_node *
>>   route_node_match_ipv6 (const struct route_table *table,
>>   		       const struct in6_addr *addr)
>> @@ -261,7 +260,6 @@ route_node_match_ipv6 (const struct route_table *table,
>>
>>     return route_node_match (table, (struct prefix *) &p);
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   /* Lookup same prefix node.  Return NULL when we can't find route. */
>>   struct route_node *
>> diff --git a/lib/table.h b/lib/table.h
>> index ab357a0..371c6ea 100644
>> --- a/lib/table.h
>> +++ b/lib/table.h
>> @@ -156,10 +156,8 @@ extern struct route_node *route_node_match (const struct route_table *,
>>                                               const struct prefix *);
>>   extern struct route_node *route_node_match_ipv4 (const struct route_table *,
>>   						 const struct in_addr *);
>> -#ifdef HAVE_IPV6
>>   extern struct route_node *route_node_match_ipv6 (const struct route_table *,
>>   						 const struct in6_addr *);
>> -#endif /* HAVE_IPV6 */
>>
>>   extern unsigned long route_table_count (const struct route_table *);
>>
>> diff --git a/lib/vty.c b/lib/vty.c
>> index 488f8d5..2648aa8 100644
>> --- a/lib/vty.c
>> +++ b/lib/vty.c
>> @@ -1735,7 +1735,6 @@ vty_accept (struct thread *thread)
>>   	}
>>       }
>>
>> -#ifdef HAVE_IPV6
>>     /* VTY's ipv6 accesslist apply. */
>>     if (p->family == AF_INET6 && vty_ipv6_accesslist_name)
>>       {
>> @@ -1754,7 +1753,6 @@ vty_accept (struct thread *thread)
>>   	  return 0;
>>   	}
>>       }
>> -#endif /* HAVE_IPV6 */
>>
>>     prefix_free (p);
>>
>> @@ -1773,7 +1771,6 @@ vty_accept (struct thread *thread)
>>     return 0;
>>   }
>>
>> -#if defined(HAVE_IPV6) && !defined(NRL)
>>   static void
>>   vty_serv_sock_addrinfo (const char *hostname, unsigned short port)
>>   {
>> @@ -1804,10 +1801,7 @@ vty_serv_sock_addrinfo (const char *hostname, unsigned short port)
>>     do
>>       {
>>         if (ainfo->ai_family != AF_INET
>> -#ifdef HAVE_IPV6
>> -	  && ainfo->ai_family != AF_INET6
>> -#endif /* HAVE_IPV6 */
>> -	  )
>> +	  && ainfo->ai_family != AF_INET6)
>>   	continue;
>>
>>         sock = socket (ainfo->ai_family, ainfo->ai_socktype, ainfo->ai_protocol);
>> @@ -1838,75 +1832,6 @@ vty_serv_sock_addrinfo (const char *hostname, unsigned short port)
>>
>>     freeaddrinfo (ainfo_save);
>>   }
>> -#else /* HAVE_IPV6 && ! NRL */
>> -
>> -/* Make vty server socket. */
>> -static void
>> -vty_serv_sock_family (const char* addr, unsigned short port, int family)
>> -{
>> -  int ret;
>> -  union sockunion su;
>> -  int accept_sock;
>> -  void* naddr=NULL;
>> -
>> -  memset (&su, 0, sizeof (union sockunion));
>> -  su.sa.sa_family = family;
>> -  if(addr)
>> -    switch(family)
>> -    {
>> -      case AF_INET:
>> -        naddr=&su.sin.sin_addr;
>> -        break;
>> -#ifdef HAVE_IPV6
>> -      case AF_INET6:
>> -        naddr=&su.sin6.sin6_addr;
>> -        break;
>> -#endif
>> -    }
>> -
>> -  if(naddr)
>> -    switch(inet_pton(family,addr,naddr))
>> -    {
>> -      case -1:
>> -        zlog_err("bad address %s",addr);
>> -	naddr=NULL;
>> -	break;
>> -      case 0:
>> -        zlog_err("error translating address %s: %s",addr,safe_strerror(errno));
>> -	naddr=NULL;
>> -    }
>> -
>> -  /* Make new socket. */
>> -  accept_sock = sockunion_stream_socket (&su);
>> -  if (accept_sock < 0)
>> -    return;
>> -
>> -  /* This is server, so reuse address. */
>> -  sockopt_reuseaddr (accept_sock);
>> -  sockopt_reuseport (accept_sock);
>> -
>> -  /* Bind socket to universal address and given port. */
>> -  ret = sockunion_bind (accept_sock, &su, port, naddr);
>> -  if (ret < 0)
>> -    {
>> -      zlog_warn("can't bind socket");
>> -      close (accept_sock);	/* Avoid sd leak. */
>> -      return;
>> -    }
>> -
>> -  /* Listen socket under queue 3. */
>> -  ret = listen (accept_sock, 3);
>> -  if (ret < 0)
>> -    {
>> -      zlog (NULL, LOG_WARNING, "can't listen socket");
>> -      close (accept_sock);	/* Avoid sd leak. */
>> -      return;
>> -    }
>> -
>> -  /* Add vty server event. */
>> -  vty_event (VTY_SERV, accept_sock, NULL);
>> -}
>> -#endif /* HAVE_IPV6 && ! NRL */
>>
>>   #ifdef VTYSH
>>   /* For sockaddr_un. */
>> @@ -2138,19 +2063,7 @@ vty_serv_sock (const char *addr, unsigned short port, const char *path)
>>   {
>>     /* If port is set to 0, do not listen on TCP/IP at all! */
>>     if (port)
>> -    {
>> -
>> -#ifdef HAVE_IPV6
>> -#ifdef NRL
>> -      vty_serv_sock_family (addr, port, AF_INET);
>> -      vty_serv_sock_family (addr, port, AF_INET6);
>> -#else /* ! NRL */
>> -      vty_serv_sock_addrinfo (addr, port);
>> -#endif /* NRL*/
>> -#else /* ! HAVE_IPV6 */
>> -      vty_serv_sock_family (addr,port, AF_INET);
>> -#endif /* HAVE_IPV6 */
>> -    }
>> +    vty_serv_sock_addrinfo (addr, port);
>>
>>   #ifdef VTYSH
>>     vty_serv_un (path);
>> @@ -2677,7 +2590,6 @@ DEFUN (no_vty_access_class,
>>     return CMD_SUCCESS;
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   /* Set vty access class. */
>>   DEFUN (vty_ipv6_access_class,
>>          vty_ipv6_access_class_cmd,
>> @@ -2717,7 +2629,6 @@ DEFUN (no_vty_ipv6_access_class,
>>
>>     return CMD_SUCCESS;
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   /* vty login. */
>>   DEFUN (vty_login,
>> @@ -2999,10 +2910,8 @@ vty_init (struct thread_master *master_thread)
>>     install_element (VTY_NODE, &no_vty_login_cmd);
>>     install_element (VTY_NODE, &vty_restricted_mode_cmd);
>>     install_element (VTY_NODE, &vty_no_restricted_mode_cmd);
>> -#ifdef HAVE_IPV6
>>     install_element (VTY_NODE, &vty_ipv6_access_class_cmd);
>>     install_element (VTY_NODE, &no_vty_ipv6_access_class_cmd);
>> -#endif /* HAVE_IPV6 */
>>   }
>>
>>   void
>> diff --git a/lib/zclient.c b/lib/zclient.c
>> index 3b5477e..c73bf36 100644
>> --- a/lib/zclient.c
>> +++ b/lib/zclient.c
>> @@ -519,7 +519,6 @@ zapi_ipv4_route (u_char cmd, struct zclient *zclient, struct prefix_ipv4 *p,
>>     return zclient_send_message(zclient);
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   int
>>   zapi_ipv6_route (u_char cmd, struct zclient *zclient, struct prefix_ipv6 *p,
>>   	       struct zapi_ipv6 *api)
>> @@ -572,7 +571,6 @@ zapi_ipv6_route (u_char cmd, struct zclient *zclient, struct prefix_ipv6 *p,
>>
>>     return zclient_send_message(zclient);
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   /*
>>    * send a ZEBRA_REDISTRIBUTE_ADD or ZEBRA_REDISTRIBUTE_DELETE
>> diff --git a/lib/zclient.h b/lib/zclient.h
>> index a660bbf..98e0945 100644
>> --- a/lib/zclient.h
>> +++ b/lib/zclient.h
>> @@ -159,7 +159,6 @@ extern void zebra_router_id_update_read (struct stream *s, struct prefix *rid);
>>   extern int zapi_ipv4_route (u_char, struct zclient *, struct prefix_ipv4 *,
>>                               struct zapi_ipv4 *);
>>
>> -#ifdef HAVE_IPV6
>>   /* IPv6 prefix add and delete function prototype. */
>>
>>   struct zapi_ipv6
>> @@ -185,6 +184,5 @@ struct zapi_ipv6
>>
>>   extern int zapi_ipv6_route (u_char cmd, struct zclient *zclient,
>>                        struct prefix_ipv6 *p, struct zapi_ipv6 *api);
>> -#endif /* HAVE_IPV6 */
>>
>>   #endif /* _ZEBRA_ZCLIENT_H */
>> diff --git a/lib/zebra.h b/lib/zebra.h
>> index 3715b34..c831d4e 100644
>> --- a/lib/zebra.h
>> +++ b/lib/zebra.h
>> @@ -244,18 +244,12 @@ typedef int socklen_t;
>>   #include <execinfo.h>
>>   #endif /* HAVE_GLIBC_BACKTRACE */
>>
>> -#ifdef BSDI_NRL
>> -
>>   #ifdef HAVE_NETINET6_IN6_H
>>   #include <netinet6/in6.h>
>>   #endif /* HAVE_NETINET6_IN6_H */
>>
>> -#ifdef NRL
>> -#include <netinet6/in6.h>
>> -#endif /* NRL */
>> -
>> +#ifdef BSDI_NRL
>>   #define IN6_ARE_ADDR_EQUAL IN6_IS_ADDR_EQUAL
>> -
>>   #endif /* BSDI_NRL */
>>
>>   /* Local includes: */
>> diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
>> index 89b9b25..3785b62 100644
>> --- a/vtysh/vtysh.c
>> +++ b/vtysh/vtysh.c
>> @@ -2024,7 +2024,6 @@ ALIAS (vtysh_traceroute,
>>          "IP trace\n"
>>          "Trace route to destination address or hostname\n")
>>
>> -#ifdef HAVE_IPV6
>>   DEFUN (vtysh_ping6,
>>          vtysh_ping6_cmd,
>>          "ping ipv6 WORD",
>> @@ -2046,7 +2045,6 @@ DEFUN (vtysh_traceroute6,
>>     execute_command ("traceroute6", 1, argv[0], NULL);
>>     return CMD_SUCCESS;
>>   }
>> -#endif
>>
>>   DEFUN (vtysh_telnet,
>>          vtysh_telnet_cmd,
>> @@ -2259,15 +2257,11 @@ vtysh_init_vty (void)
>>     install_node (&bgp_vpnv4_node, NULL);
>>     install_node (&bgp_ipv4_node, NULL);
>>     install_node (&bgp_ipv4m_node, NULL);
>> -/* #ifdef HAVE_IPV6 */
>>     install_node (&bgp_ipv6_node, NULL);
>>     install_node (&bgp_ipv6m_node, NULL);
>> -/* #endif */
>>     install_node (&ospf_node, NULL);
>> -/* #ifdef HAVE_IPV6 */
>>     install_node (&ripng_node, NULL);
>>     install_node (&ospf6_node, NULL);
>> -/* #endif */
>>     install_node (&babel_node, NULL);
>>     install_node (&keychain_node, NULL);
>>     install_node (&keychain_key_node, NULL);
>> @@ -2364,13 +2358,9 @@ vtysh_init_vty (void)
>>     install_element (INTERFACE_NODE, &vtysh_exit_interface_cmd);
>>     install_element (INTERFACE_NODE, &vtysh_quit_interface_cmd);
>>     install_element (CONFIG_NODE, &router_rip_cmd);
>> -#ifdef HAVE_IPV6
>>     install_element (CONFIG_NODE, &router_ripng_cmd);
>> -#endif
>>     install_element (CONFIG_NODE, &router_ospf_cmd);
>> -#ifdef HAVE_IPV6
>>     install_element (CONFIG_NODE, &router_ospf6_cmd);
>> -#endif
>>     install_element (CONFIG_NODE, &router_babel_cmd);
>>     install_element (CONFIG_NODE, &router_isis_cmd);
>>     install_element (CONFIG_NODE, &router_bgp_cmd);
>> @@ -2379,10 +2369,8 @@ vtysh_init_vty (void)
>>     install_element (BGP_NODE, &address_family_vpnv4_unicast_cmd);
>>     install_element (BGP_NODE, &address_family_ipv4_unicast_cmd);
>>     install_element (BGP_NODE, &address_family_ipv4_multicast_cmd);
>> -#ifdef HAVE_IPV6
>>     install_element (BGP_NODE, &address_family_ipv6_cmd);
>>     install_element (BGP_NODE, &address_family_ipv6_unicast_cmd);
>> -#endif
>>     install_element (BGP_VPNV4_NODE, &exit_address_family_cmd);
>>     install_element (BGP_IPV4_NODE, &exit_address_family_cmd);
>>     install_element (BGP_IPV4M_NODE, &exit_address_family_cmd);
>> @@ -2421,10 +2409,8 @@ vtysh_init_vty (void)
>>     install_element (VIEW_NODE, &vtysh_ping_ip_cmd);
>>     install_element (VIEW_NODE, &vtysh_traceroute_cmd);
>>     install_element (VIEW_NODE, &vtysh_traceroute_ip_cmd);
>> -#ifdef HAVE_IPV6
>>     install_element (VIEW_NODE, &vtysh_ping6_cmd);
>>     install_element (VIEW_NODE, &vtysh_traceroute6_cmd);
>> -#endif
>>     install_element (VIEW_NODE, &vtysh_telnet_cmd);
>>     install_element (VIEW_NODE, &vtysh_telnet_port_cmd);
>>     install_element (VIEW_NODE, &vtysh_ssh_cmd);
>> @@ -2432,10 +2418,8 @@ vtysh_init_vty (void)
>>     install_element (ENABLE_NODE, &vtysh_ping_ip_cmd);
>>     install_element (ENABLE_NODE, &vtysh_traceroute_cmd);
>>     install_element (ENABLE_NODE, &vtysh_traceroute_ip_cmd);
>> -#ifdef HAVE_IPV6
>>     install_element (ENABLE_NODE, &vtysh_ping6_cmd);
>>     install_element (ENABLE_NODE, &vtysh_traceroute6_cmd);
>> -#endif
>>     install_element (ENABLE_NODE, &vtysh_telnet_cmd);
>>     install_element (ENABLE_NODE, &vtysh_telnet_port_cmd);
>>     install_element (ENABLE_NODE, &vtysh_ssh_cmd);
>> diff --git a/zebra/client_main.c b/zebra/client_main.c
>> index 8b95907..b941e35 100644
>> --- a/zebra/client_main.c
>> +++ b/zebra/client_main.c
>> @@ -80,7 +80,6 @@ zebra_test_ipv4 (int command, int type, char *prefix, char *gateway,
>>       }
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   /* IPv6 route add and delete test. */
>>   void
>>   zebra_test_v6 (int sock)
>> @@ -96,7 +95,6 @@ zebra_test_v6 (int sock)
>>     sleep (5);
>>     /* zebra_ipv6_delete (sock, ZEBRA_ROUTE_STATIC, 0, &p, &nexthop, 1); */
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   /* Print out usage and exit. */
>>   void
>> diff --git a/zebra/connected.c b/zebra/connected.c
>> index c4f87f4..3e02e5a 100644
>> --- a/zebra/connected.c
>> +++ b/zebra/connected.c
>> @@ -54,10 +54,8 @@ connected_withdraw (struct connected *ifc)
>>
>>         if (ifc->address->family == AF_INET)
>>           connected_down_ipv4 (ifc->ifp, ifc);
>> -#ifdef HAVE_IPV6
>>         else
>>           connected_down_ipv6 (ifc->ifp, ifc);
>> -#endif
>>
>>         UNSET_FLAG (ifc->conf, ZEBRA_IFC_REAL);
>>       }
>> @@ -90,10 +88,8 @@ connected_announce (struct interface *ifp, struct connected *ifc)
>>       {
>>         if (ifc->address->family == AF_INET)
>>           connected_up_ipv4 (ifp, ifc);
>> -#ifdef HAVE_IPV6
>>         else
>>           connected_up_ipv6 (ifp, ifc);
>> -#endif
>>       }
>>   }
>>
>> @@ -333,7 +329,6 @@ connected_delete_ipv4 (struct interface *ifp, int flags, struct in_addr *addr,
>>     rib_update();
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   void
>>   connected_up_ipv6 (struct interface *ifp, struct connected *ifc)
>>   {
>> @@ -461,4 +456,3 @@ connected_delete_ipv6 (struct interface *ifp, struct in6_addr *address,
>>
>>     rib_update();
>>   }
>> -#endif /* HAVE_IPV6 */
>> diff --git a/zebra/connected.h b/zebra/connected.h
>> index 9595ddb..cdef38d 100644
>> --- a/zebra/connected.h
>> +++ b/zebra/connected.h
>> @@ -38,7 +38,6 @@ connected_delete_ipv4 (struct interface *ifp, int flags, struct in_addr *addr,
>>   extern void connected_up_ipv4 (struct interface *, struct connected *);
>>   extern void connected_down_ipv4 (struct interface *, struct connected *);
>>
>> -#ifdef HAVE_IPV6
>>   extern void
>>   connected_add_ipv6 (struct interface *ifp, int flags, struct in6_addr *address,
>>   		    u_char prefixlen, struct in6_addr *broad,
>> @@ -50,6 +49,5 @@ connected_delete_ipv6 (struct interface *ifp, struct in6_addr *address,
>>   extern void connected_up_ipv6 (struct interface *, struct connected *);
>>   extern void connected_down_ipv6 (struct interface *ifp, struct connected *);
>>
>> -#endif /* HAVE_IPV6 */
>>
>>   #endif /*_ZEBRA_CONNECTED_H */
>> diff --git a/zebra/if_ioctl.c b/zebra/if_ioctl.c
>> index f357e15..9004f57 100644
>> --- a/zebra/if_ioctl.c
>> +++ b/zebra/if_ioctl.c
>> @@ -278,7 +278,6 @@ if_getaddrs (void)
>>   	  connected_add_ipv4 (ifp, flags, &addr->sin_addr,
>>   			      prefixlen, dest_pnt, NULL);
>>   	}
>> -#ifdef HAVE_IPV6
>>         if (ifap->ifa_addr->sa_family == AF_INET6)
>>   	{
>>   	  struct sockaddr_in6 *addr;
>> @@ -323,7 +322,6 @@ if_getaddrs (void)
>>   	  connected_add_ipv6 (ifp, flags, &addr->sin6_addr, prefixlen,
>>   	                      dest_pnt, NULL);
>>   	}
>> -#endif /* HAVE_IPV6 */
>>       }
>>
>>     freeifaddrs (ifapfree);
>> @@ -459,9 +457,9 @@ interface_list ()
>>     if_getaddrs ();
>>   #endif /* HAVE_GETIFADDRS */
>>
>> -#if defined(HAVE_IPV6) && defined(HAVE_PROC_NET_IF_INET6)
>> +#if defined(HAVE_PROC_NET_IF_INET6)
>>     /* Linux provides interface's IPv6 address via
>>        /proc/net/if_inet6. */
>>     ifaddr_proc_ipv6 ();
>> -#endif /* HAVE_IPV6 && HAVE_PROC_NET_IF_INET6 */
>> +#endif /* HAVE_PROC_NET_IF_INET6 */
>>   }
>> diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c
>> index fc384ea..93f1089 100644
>> --- a/zebra/if_ioctl_solaris.c
>> +++ b/zebra/if_ioctl_solaris.c
>> @@ -173,15 +173,8 @@ calculate_lifc_len:     /* must hold privileges to enter here */
>>           ifp->flags |= IFF_IPV4;
>>
>>         if (lifreq->lifr_addr.ss_family == AF_INET6)
>> -        {
>> -#ifdef HAVE_IPV6
>> -          ifp->flags |= IFF_IPV6;
>> -#else
>> -          lifreq++;
>> -          continue;
>> -#endif /* HAVE_IPV6 */
>> -        }
>> -
>> +        ifp->flags |= IFF_IPV6;
>> +
>>         if_add_update (ifp);
>>
>>         interface_info_ioctl (ifp);
>> @@ -306,7 +299,6 @@ if_get_addr (struct interface *ifp, struct sockaddr *addr, const char *label)
>>             dest_pnt = (char *) &SIN (&dest)->sin_addr;
>>           }
>>       }
>> -#ifdef HAVE_IPV6
>>     else if (af == AF_INET6)
>>       {
>>         if (if_ioctl_ipv6 (SIOCGLIFSUBNET, (caddr_t) & lifreq) < 0)
>> @@ -322,17 +314,14 @@ if_get_addr (struct interface *ifp, struct sockaddr *addr, const char *label)
>>   	  prefixlen = lifreq.lifr_addrlen;
>>   	}
>>       }
>> -#endif /* HAVE_IPV6 */
>>
>>     /* Set address to the interface. */
>>     if (af == AF_INET)
>>       connected_add_ipv4 (ifp, flags, &SIN (addr)->sin_addr, prefixlen,
>>                           (struct in_addr *) dest_pnt, label);
>> -#ifdef HAVE_IPV6
>>     else if (af == AF_INET6)
>>       connected_add_ipv6 (ifp, flags, &SIN6 (addr)->sin6_addr, prefixlen,
>>                           (struct in6_addr *) dest_pnt, label);
>> -#endif /* HAVE_IPV6 */
>>
>>     return 0;
>>   }
>> @@ -359,7 +348,6 @@ interface_list ()
>>   struct connected *
>>   if_lookup_linklocal (struct interface *ifp)
>>   {
>> -#ifdef HAVE_IPV6
>>     struct listnode *node;
>>     struct connected *ifc;
>>
>> @@ -372,7 +360,6 @@ if_lookup_linklocal (struct interface *ifp)
>>             (IN6_IS_ADDR_LINKLOCAL (&ifc->address->u.prefix6)))
>>           return ifc;
>>       }
>> -#endif /* HAVE_IPV6 */
>>
>>     return NULL;
>>   }
>> diff --git a/zebra/if_proc.c b/zebra/if_proc.c
>> index 2dbc472..56c6047 100644
>> --- a/zebra/if_proc.c
>> +++ b/zebra/if_proc.c
>> @@ -198,9 +198,8 @@ interface_list_proc ()
>>     fclose(fp);
>>     return 0;
>>   }
>> -
>> -#if defined(HAVE_IPV6) && defined(HAVE_PROC_NET_IF_INET6)
>> -
>> +
>> +#if defined(HAVE_PROC_NET_IF_INET6)
>>   #ifndef _PATH_PROC_NET_IF_INET6
>>   #define _PATH_PROC_NET_IF_INET6          "/proc/net/if_inet6"
>>   #endif /* _PATH_PROC_NET_IF_INET6 */
>> @@ -245,4 +244,4 @@ ifaddr_proc_ipv6 ()
>>     fclose (fp);
>>     return 0;
>>   }
>> -#endif /* HAVE_IPV6 && HAVE_PROC_NET_IF_INET6 */
>> +#endif /* HAVE_PROC_NET_IF_INET6 */
>> diff --git a/zebra/interface.c b/zebra/interface.c
>> index 7e1d3dd..7ffc5a3 100644
>> --- a/zebra/interface.c
>> +++ b/zebra/interface.c
>> @@ -333,7 +333,6 @@ if_addr_wakeup (struct interface *ifp)
>>   	       * from the kernel has been received.
>>   	       * It will also be added to the interface's subnet list then. */
>>   	    }
>> -#ifdef HAVE_IPV6
>>   	  if (p->family == AF_INET6)
>>   	    {
>>   	      if (! if_is_up (ifp))
>> @@ -355,7 +354,6 @@ if_addr_wakeup (struct interface *ifp)
>>   	      /* The address will be advertised to zebra clients when the notification
>>   	       * from the kernel has been received. */
>>   	    }
>> -#endif /* HAVE_IPV6 */
>>   	}
>>       }
>>   }
>> @@ -488,7 +486,6 @@ if_delete_update (struct interface *ifp)
>>   	      rn->info = NULL;
>>   	      route_unlock_node (rn);
>>   	    }
>> -#ifdef HAVE_IPV6
>>   	  else if (p->family == AF_INET6)
>>   	    {
>>   	      connected_down_ipv6 (ifp, ifc);
>> @@ -506,7 +503,6 @@ if_delete_update (struct interface *ifp)
>>   		  connected_free (ifc);
>>   		}
>>   	    }
>> -#endif /* HAVE_IPV6 */
>>   	  else
>>   	    {
>>   	      last = node;
>> @@ -544,10 +540,8 @@ if_up (struct interface *ifp)
>>
>>   	  if (p->family == AF_INET)
>>   	    connected_up_ipv4 (ifp, ifc);
>> -#ifdef HAVE_IPV6
>>   	  else if (p->family == AF_INET6)
>>   	    connected_up_ipv6 (ifp, ifc);
>> -#endif /* HAVE_IPV6 */
>>   	}
>>       }
>>
>> @@ -577,10 +571,8 @@ if_down (struct interface *ifp)
>>
>>   	  if (p->family == AF_INET)
>>   	    connected_down_ipv4 (ifp, ifc);
>> -#ifdef HAVE_IPV6
>>   	  else if (p->family == AF_INET6)
>>   	    connected_down_ipv6 (ifp, ifc);
>> -#endif /* HAVE_IPV6 */
>>   	}
>>       }
>>
>> @@ -744,10 +736,8 @@ if_dump_vty (struct vty *vty, struct interface *ifp)
>>
>>     vty_out (vty, "  index %d metric %d mtu %d ",
>>   	   ifp->ifindex, ifp->metric, ifp->mtu);
>> -#ifdef HAVE_IPV6
>>     if (ifp->mtu6 != ifp->mtu)
>>       vty_out (vty, "mtu6 %d ", ifp->mtu6);
>> -#endif
>>     vty_out (vty, "%s  flags: %s%s", VTY_NEWLINE,
>>              if_flag_dump (ifp->flags), VTY_NEWLINE);
>>
>> @@ -1390,7 +1380,6 @@ DEFUN (no_ip_address_label,
>>   }
>>   #endif /* HAVE_NETLINK */
>>
>> -#ifdef HAVE_IPV6
>>   static int
>>   ipv6_address_install (struct vty *vty, struct interface *ifp,
>>   		      const char *addr_str, const char *peer_str,
>> @@ -1542,7 +1531,6 @@ DEFUN (no_ipv6_address,
>>   {
>>     return ipv6_address_uninstall (vty, vty->index, argv[0], NULL, NULL, 0);
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   static int
>>   if_config_write (struct vty *vty)
>> @@ -1650,10 +1638,8 @@ zebra_if_init (void)
>>     install_element (INTERFACE_NODE, &no_bandwidth_if_val_cmd);
>>     install_element (INTERFACE_NODE, &ip_address_cmd);
>>     install_element (INTERFACE_NODE, &no_ip_address_cmd);
>> -#ifdef HAVE_IPV6
>>     install_element (INTERFACE_NODE, &ipv6_address_cmd);
>>     install_element (INTERFACE_NODE, &no_ipv6_address_cmd);
>> -#endif /* HAVE_IPV6 */
>>   #ifdef HAVE_NETLINK
>>     install_element (INTERFACE_NODE, &ip_address_label_cmd);
>>     install_element (INTERFACE_NODE, &no_ip_address_label_cmd);
>> diff --git a/zebra/ioctl.c b/zebra/ioctl.c
>> index d783b0a..149d9a0 100644
>> --- a/zebra/ioctl.c
>> +++ b/zebra/ioctl.c
>> @@ -79,7 +79,6 @@ if_ioctl (u_long request, caddr_t buffer)
>>     return 0;
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   static int
>>   if_ioctl_ipv6 (u_long request, caddr_t buffer)
>>   {
>> @@ -113,7 +112,6 @@ if_ioctl_ipv6 (u_long request, caddr_t buffer)
>>       }
>>     return 0;
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   /*
>>    * get interface metric
>> @@ -436,8 +434,6 @@ if_unset_flags (struct interface *ifp, uint64_t flags)
>>     return 0;
>>   }
>>
>> -#ifdef HAVE_IPV6
>> -
>>   #ifdef LINUX_IPV6
>>   #ifndef _LINUX_IN6_H
>>   /* linux/include/net/ipv6.h */
>> @@ -491,6 +487,7 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc)
>>   }
>>   #else /* LINUX_IPV6 */
>>   #ifdef HAVE_STRUCT_IN6_ALIASREQ
>> +
>>   #ifndef ND6_INFINITE_LIFETIME
>>   #define ND6_INFINITE_LIFETIME 0xffffffffL
>>   #endif /* ND6_INFINITE_LIFETIME */
>> @@ -578,20 +575,5 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc)
>>       return ret;
>>     return 0;
>>   }
>> -#else
>> -int
>> -if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc)
>> -{
>> -  return 0;
>> -}
>> -
>> -int
>> -if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc)
>> -{
>> -  return 0;
>> -}
>>   #endif /* HAVE_STRUCT_IN6_ALIASREQ */
>> -
>>   #endif /* LINUX_IPV6 */
>> -
>> -#endif /* HAVE_IPV6 */
>> diff --git a/zebra/ioctl.h b/zebra/ioctl.h
>> index fee9b72..9e3fd5b 100644
>> --- a/zebra/ioctl.h
>> +++ b/zebra/ioctl.h
>> @@ -37,10 +37,8 @@ extern int if_unset_prefix (struct interface *, struct connected *);
>>   extern void if_get_metric (struct interface *);
>>   extern void if_get_mtu (struct interface *);
>>
>> -#ifdef HAVE_IPV6
>>   extern int if_prefix_add_ipv6 (struct interface *, struct connected *);
>>   extern int if_prefix_delete_ipv6 (struct interface *, struct connected *);
>> -#endif /* HAVE_IPV6 */
>>
>>   #ifdef SOLARIS_IPV6
>>   extern int if_ioctl_ipv6(u_long, caddr_t);
>> diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c
>> index 6c1c254..b2d707f 100644
>> --- a/zebra/ioctl_solaris.c
>> +++ b/zebra/ioctl_solaris.c
>> @@ -83,7 +83,6 @@ if_ioctl (u_long request, caddr_t buffer)
>>   int
>>   if_ioctl_ipv6 (u_long request, caddr_t buffer)
>>   {
>> -#ifdef HAVE_IPV6
>>     int sock;
>>     int ret;
>>     int err;
>> @@ -115,7 +114,6 @@ if_ioctl_ipv6 (u_long request, caddr_t buffer)
>>         errno = err;
>>         return ret;
>>       }
>> -#endif /* HAVE_IPV6 */
>>
>>     return 0;
>>   }
>> @@ -175,7 +173,6 @@ if_get_mtu (struct interface *ifp)
>>           }
>>       }
>>
>> -#ifdef HAVE_IPV6
>>     if (ifp->flags & IFF_IPV6)
>>     {
>>       memset(&lifreq, 0, sizeof(lifreq));
>> @@ -193,7 +190,6 @@ if_get_mtu (struct interface *ifp)
>>         changed = 1;
>>       }
>>     }
>> -#endif /* HAVE_IPV6 */
>>
>>     if (changed)
>>       zebra_interface_up_update(ifp);
>> @@ -401,7 +397,6 @@ if_unset_flags (struct interface *ifp, uint64_t flags)
>>     return ret;
>>   }
>>
>> -#ifdef HAVE_IPV6
>>
>>   /* Interface's address add/delete functions. */
>>   int
>> @@ -429,5 +424,3 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc)
>>     return 0;
>>
>>   }
>> -
>> -#endif /* HAVE_IPV6 */
>> diff --git a/zebra/ipforward.h b/zebra/ipforward.h
>> index 8a935c1..a75073c 100644
>> --- a/zebra/ipforward.h
>> +++ b/zebra/ipforward.h
>> @@ -26,10 +26,8 @@ extern int ipforward (void);
>>   extern int ipforward_on (void);
>>   extern int ipforward_off (void);
>>
>> -#ifdef HAVE_IPV6
>>   extern int ipforward_ipv6 (void);
>>   extern int ipforward_ipv6_on (void);
>>   extern int ipforward_ipv6_off (void);
>> -#endif /* HAVE_IPV6 */
>>
>>   #endif /* _ZEBRA_IPFORWARD_H */
>> diff --git a/zebra/ipforward_proc.c b/zebra/ipforward_proc.c
>> index 2876ede..9920028 100644
>> --- a/zebra/ipforward_proc.c
>> +++ b/zebra/ipforward_proc.c
>> @@ -123,7 +123,6 @@ ipforward_off (void)
>>
>>     return ipforward ();
>>   }
>> -#ifdef HAVE_IPV6
>>
>>   char proc_ipv6_forwarding[] = "/proc/sys/net/ipv6/conf/all/forwarding";
>>
>> @@ -197,4 +196,3 @@ ipforward_ipv6_off (void)
>>
>>     return ipforward_ipv6 ();
>>   }
>> -#endif /* HAVE_IPV6 */
>> diff --git a/zebra/ipforward_solaris.c b/zebra/ipforward_solaris.c
>> index 4aa1b79..8eccfe1 100644
>> --- a/zebra/ipforward_solaris.c
>> +++ b/zebra/ipforward_solaris.c
>> @@ -145,7 +145,6 @@ ipforward_off (void)
>>     (void) solaris_nd_set("ip_forwarding", 0);
>>     return ipforward();
>>   }
>> -#ifdef HAVE_IPV6
>>   int ipforward_ipv6(void)
>>   {
>>     return solaris_nd_get("ip6_forwarding");
>> @@ -162,4 +161,3 @@ ipforward_ipv6_off (void)
>>     (void) solaris_nd_set("ip6_forwarding", 0);
>>     return ipforward_ipv6();
>>   }
>> -#endif /* HAVE_IPV6 */
>> diff --git a/zebra/ipforward_sysctl.c b/zebra/ipforward_sysctl.c
>> index 185aee3..5b04425 100644
>> --- a/zebra/ipforward_sysctl.c
>> +++ b/zebra/ipforward_sysctl.c
>> @@ -23,10 +23,6 @@
>>   #include "privs.h"
>>   #include "zebra/ipforward.h"
>>
>> -#ifdef NRL
>> -#include <netinet6/in6.h>
>> -#endif /* NRL */
>> -
>>   #include "log.h"
>>
>>   #define MIB_SIZ 4
>> @@ -99,8 +95,6 @@ ipforward_off (void)
>>     return ipforwarding;
>>   }
>>
>> -#ifdef HAVE_IPV6
>> -
>>   /* IPv6 forwarding control MIB. */
>>   int mib_ipv6[MIB_SIZ] =
>>   {
>> @@ -177,4 +171,3 @@ ipforward_ipv6_off (void)
>>       zlog (NULL, LOG_ERR, "Can't lower privileges");
>>     return ip6forwarding;
>>   }
>> -#endif /* HAVE_IPV6 */
>> diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
>> index 3dbeb98..5347890 100644
>> --- a/zebra/kernel_socket.c
>> +++ b/zebra/kernel_socket.c
>> @@ -64,7 +64,7 @@ extern struct zebra_t zebrad;
>>    */
>>   #if defined(HAVE_STRUCT_SOCKADDR_SA_LEN)
>>   #define SAROUNDUP(X)   ROUNDUP(((struct sockaddr *)(X))->sa_len)
>> -#elif defined(HAVE_IPV6)
>> +#else
>>   /*
>>    * One would hope all fixed-size structure definitions are aligned,
>>    * but round them up nonetheless.
>> @@ -76,12 +76,6 @@ extern struct zebra_t zebrad;
>>          ROUNDUP(sizeof(struct sockaddr_in6)) :  \
>>          (((struct sockaddr *)(X))->sa_family == AF_LINK ? \
>>            ROUNDUP(sizeof(struct sockaddr_dl)) : sizeof(struct sockaddr))))
>> -#else /* HAVE_IPV6 */
>> -#define SAROUNDUP(X) \
>> -      (((struct sockaddr *)(X))->sa_family == AF_INET ?   \
>> -        ROUNDUP(sizeof(struct sockaddr_in)):\
>> -         (((struct sockaddr *)(X))->sa_family == AF_LINK ? \
>> -           ROUNDUP(sizeof(struct sockaddr_dl)) : sizeof(struct sockaddr)))
>>   #endif /* HAVE_STRUCT_SOCKADDR_SA_LEN */
>>
>>   /*
>> @@ -246,10 +240,8 @@ af_check (int family)
>>   {
>>     if (family == AF_INET)
>>       return 1;
>> -#ifdef HAVE_IPV6
>>     if (family == AF_INET6)
>>       return 1;
>> -#endif /* HAVE_IPV6 */
>>     return 0;
>>   }
>>
>> @@ -615,7 +607,6 @@ ifam_read_mesg (struct ifa_msghdr *ifm,
>>   			          buf[3],sizeof(buf[3])));
>>   	  }
>>   	  break;
>> -#ifdef HAVE_IPV6
>>   	case AF_INET6:
>>   	  {
>>   	    char buf[4][INET6_ADDRSTRLEN];
>> @@ -636,7 +627,6 @@ ifam_read_mesg (struct ifa_msghdr *ifm,
>>   			          buf[3],sizeof(buf[3])));
>>   	  }
>>   	  break;
>> -#endif /* HAVE_IPV6 */
>>           default:
>>   	  zlog_debug ("%s: ifindex %d, ifname %s, ifam_addrs 0x%x",
>>   		      __func__, ifm->ifam_index,
>> @@ -705,7 +695,6 @@ ifam_read (struct ifa_msghdr *ifam)
>>   			       ip_masklen (mask.sin.sin_addr),
>>   			       &brd.sin.sin_addr);
>>         break;
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         /* Unset interface index from link-local address when IPv6 stack
>>   	 is KAME. */
>> @@ -723,7 +712,6 @@ ifam_read (struct ifa_msghdr *ifam)
>>   			       ip6_masklen (mask.sin6.sin6_addr),
>>   			       &brd.sin6.sin6_addr);
>>         break;
>> -#endif /* HAVE_IPV6 */
>>       default:
>>         /* Unsupported family silently ignore... */
>>         break;
>> @@ -946,7 +934,6 @@ rtm_read (struct rt_msghdr *rtm)
>>   	rib_delete_ipv4 (ZEBRA_ROUTE_KERNEL, zebra_flags,
>>   		      &p, &gate.sin.sin_addr, 0, 0, SAFI_UNICAST);
>>       }
>> -#ifdef HAVE_IPV6
>>     if (dest.sa.sa_family == AF_INET6)
>>       {
>>         /* One day we might have a debug section here like one in the
>> @@ -988,7 +975,6 @@ rtm_read (struct rt_msghdr *rtm)
>>   	rib_delete_ipv6 (ZEBRA_ROUTE_KERNEL, zebra_flags,
>>   			 &p, &gate.sin6.sin6_addr, ifindex, 0, SAFI_UNICAST);
>>       }
>> -#endif /* HAVE_IPV6 */
>>   }
>>
>>   /* Interface function for the kernel routing table updates.  Support
>> diff --git a/zebra/redistribute.c b/zebra/redistribute.c
>> index 078c2ad..a9e9458 100644
>> --- a/zebra/redistribute.c
>> +++ b/zebra/redistribute.c
>> @@ -55,7 +55,6 @@ zebra_check_addr (struct prefix *p)
>>             || IPV4_LINKLOCAL(addr))
>>   	return 0;
>>       }
>> -#ifdef HAVE_IPV6
>>     if (p->family == AF_INET6)
>>       {
>>         if (IN6_IS_ADDR_LOOPBACK (&p->u.prefix6))
>> @@ -63,7 +62,6 @@ zebra_check_addr (struct prefix *p)
>>         if (IN6_IS_ADDR_LINKLOCAL(&p->u.prefix6))
>>   	return 0;
>>       }
>> -#endif /* HAVE_IPV6 */
>>     return 1;
>>   }
>>
>> @@ -73,14 +71,12 @@ is_default (struct prefix *p)
>>     if (p->family == AF_INET)
>>       if (p->u.prefix4.s_addr == 0 && p->prefixlen == 0)
>>         return 1;
>> -#ifdef HAVE_IPV6
>>   #if 0  /* IPv6 default separation is now pending until protocol daemon
>>             can handle that. */
>>     if (p->family == AF_INET6)
>>       if (IN6_IS_ADDR_UNSPECIFIED (&p->u.prefix6) && p->prefixlen == 0)
>>         return 1;
>>   #endif /* 0 */
>> -#endif /* HAVE_IPV6 */
>>     return 0;
>>   }
>>
>> @@ -91,9 +87,7 @@ zebra_redistribute_default (struct zserv *client)
>>     struct route_table *table;
>>     struct route_node *rn;
>>     struct rib *newrib;
>> -#ifdef HAVE_IPV6
>>     struct prefix_ipv6 p6;
>> -#endif /* HAVE_IPV6 */
>>
>>
>>     /* Lookup default route. */
>> @@ -115,7 +109,6 @@ zebra_redistribute_default (struct zserv *client)
>>   	}
>>       }
>>
>> -#ifdef HAVE_IPV6
>>     /* Lookup default route. */
>>     memset (&p6, 0, sizeof (struct prefix_ipv6));
>>     p6.family = AF_INET6;
>> @@ -134,7 +127,6 @@ zebra_redistribute_default (struct zserv *client)
>>   	  route_unlock_node (rn);
>>   	}
>>       }
>> -#endif /* HAVE_IPV6 */
>>   }
>>
>>   /* Redistribute routes. */
>> @@ -155,7 +147,6 @@ zebra_redistribute (struct zserv *client, int type)
>>   	    && zebra_check_addr (&rn->p))
>>   	  zsend_route_multipath (ZEBRA_IPV4_ROUTE_ADD, client, &rn->p, newrib);
>>
>> -#ifdef HAVE_IPV6
>>     table = vrf_table (AFI_IP6, SAFI_UNICAST, 0);
>>     if (table)
>>       for (rn = route_top (table); rn; rn = route_next (rn))
>> @@ -165,7 +156,6 @@ zebra_redistribute (struct zserv *client, int type)
>>   	    && newrib->distance != DISTANCE_INFINITY
>>   	    && zebra_check_addr (&rn->p))
>>   	  zsend_route_multipath (ZEBRA_IPV6_ROUTE_ADD, client, &rn->p, newrib);
>> -#endif /* HAVE_IPV6 */
>>   }
>>
>>   void
>> @@ -182,20 +172,16 @@ redistribute_add (struct prefix *p, struct rib *rib)
>>               {
>>                 if (p->family == AF_INET)
>>                   zsend_route_multipath (ZEBRA_IPV4_ROUTE_ADD, client, p, rib);
>> -#ifdef HAVE_IPV6
>>                 if (p->family == AF_INET6)
>>                   zsend_route_multipath (ZEBRA_IPV6_ROUTE_ADD, client, p, rib);
>> -#endif /* HAVE_IPV6 */
>>   	    }
>>           }
>>         else if (client->redist[rib->type])
>>           {
>>             if (p->family == AF_INET)
>>               zsend_route_multipath (ZEBRA_IPV4_ROUTE_ADD, client, p, rib);
>> -#ifdef HAVE_IPV6
>>             if (p->family == AF_INET6)
>>               zsend_route_multipath (ZEBRA_IPV6_ROUTE_ADD, client, p, rib);
>> -#endif /* HAVE_IPV6 */
>>           }
>>       }
>>   }
>> @@ -219,21 +205,17 @@ redistribute_delete (struct prefix *p, struct rib *rib)
>>   	      if (p->family == AF_INET)
>>   		zsend_route_multipath (ZEBRA_IPV4_ROUTE_DELETE, client, p,
>>   				       rib);
>> -#ifdef HAVE_IPV6
>>   	      if (p->family == AF_INET6)
>>   		zsend_route_multipath (ZEBRA_IPV6_ROUTE_DELETE, client, p,
>>   				       rib);
>> -#endif /* HAVE_IPV6 */
>>   	    }
>>   	}
>>         else if (client->redist[rib->type])
>>   	{
>>   	  if (p->family == AF_INET)
>>   	    zsend_route_multipath (ZEBRA_IPV4_ROUTE_DELETE, client, p, rib);
>> -#ifdef HAVE_IPV6
>>   	  if (p->family == AF_INET6)
>>   	    zsend_route_multipath (ZEBRA_IPV6_ROUTE_DELETE, client, p, rib);
>> -#endif /* HAVE_IPV6 */
>>   	}
>>       }
>>   }
>> diff --git a/zebra/rib.h b/zebra/rib.h
>> index d3a83c6..670edaf 100644
>> --- a/zebra/rib.h
>> +++ b/zebra/rib.h
>> @@ -33,9 +33,7 @@
>>
>>   union g_addr {
>>     struct in_addr ipv4;
>> -#ifdef HAVE_IPV6
>>     struct in6_addr ipv6;
>> -#endif /* HAVE_IPV6 */
>>   };
>>
>>   struct rib
>> @@ -194,7 +192,6 @@ struct static_ipv4
>>    */
>>   };
>>
>> -#ifdef HAVE_IPV6
>>   /* Static route information. */
>>   struct static_ipv6
>>   {
>> @@ -222,7 +219,6 @@ struct static_ipv6
>>        ZEBRA_FLAG_BLACKHOLE
>>    */
>>   };
>> -#endif /* HAVE_IPV6 */
>>
>>   enum nexthop_types_t
>>   {
>> @@ -396,9 +392,7 @@ extern int rib_lookup_ipv4_route (struct prefix_ipv4 *, union sockunion *);
>>   #define ZEBRA_RIB_FOUND_CONNECTED 2
>>   #define ZEBRA_RIB_NOTFOUND 3
>>
>> -#ifdef HAVE_IPV6
>>   extern struct nexthop *nexthop_ipv6_add (struct rib *, struct in6_addr *);
>> -#endif /* HAVE_IPV6 */
>>
>>   extern struct vrf *vrf_lookup (u_int32_t);
>>   extern struct route_table *vrf_table (afi_t afi, safi_t safi, u_int32_t id);
>> @@ -437,7 +431,6 @@ extern int
>>   static_delete_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname,
>>   		    u_char distance, u_int32_t vrf_id);
>>
>> -#ifdef HAVE_IPV6
>>   extern int
>>   rib_add_ipv6 (int type, int flags, struct prefix_ipv6 *p,
>>   	      struct in6_addr *gate, unsigned int ifindex, u_int32_t vrf_id,
>> @@ -462,8 +455,6 @@ extern int
>>   static_delete_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
>>   		    const char *ifname, u_char distance, u_int32_t vrf_id);
>>
>> -#endif /* HAVE_IPV6 */
>> -
>>   extern int rib_gc_dest (struct route_node *rn);
>>   extern struct route_table *rib_tables_iter_next (rib_tables_iter_t *iter);
>>
>> diff --git a/zebra/rt.h b/zebra/rt.h
>> index 8bfe5a4..7e84552 100644
>> --- a/zebra/rt.h
>> +++ b/zebra/rt.h
>> @@ -33,12 +33,9 @@ extern int kernel_add_route (struct prefix_ipv4 *, struct in_addr *, int, int);
>>   extern int kernel_address_add_ipv4 (struct interface *, struct connected *);
>>   extern int kernel_address_delete_ipv4 (struct interface *, struct connected *);
>>
>> -#ifdef HAVE_IPV6
>>   extern int kernel_add_ipv6 (struct prefix *, struct rib *);
>>   extern int kernel_delete_ipv6 (struct prefix *, struct rib *);
>>   extern int kernel_delete_ipv6_old (struct prefix_ipv6 *dest, struct in6_addr *gate,
>>   			    	  unsigned int index, int flags, int table);
>>
>> -#endif /* HAVE_IPV6 */
>> -
>>   #endif /* _ZEBRA_RT_H */
>> diff --git a/zebra/rt_ioctl.c b/zebra/rt_ioctl.c
>> index e175d1e..1bad9dc 100644
>> --- a/zebra/rt_ioctl.c
>> +++ b/zebra/rt_ioctl.c
>> @@ -333,8 +333,6 @@ kernel_delete_ipv4 (struct prefix *p, struct rib *rib)
>>     return kernel_ioctl_ipv4 (SIOCDELRT, p, rib, AF_INET);
>>   }
>>
>> -#ifdef HAVE_IPV6
>> -
>>   /* Below is hack for GNU libc definition and Linux 2.1.X header. */
>>   #undef RTF_DEFAULT
>>   #undef RTF_ADDRCONF
>> @@ -525,4 +523,3 @@ kernel_delete_ipv6_old (struct prefix_ipv6 *dest, struct in6_addr *gate,
>>   {
>>     return kernel_ioctl_ipv6 (SIOCDELRT, dest, gate, index, flags);
>>   }
>> -#endif /* HAVE_IPV6 */
>> diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
>> index 95a82fd..5cccd5b 100644
>> --- a/zebra/rt_netlink.c
>> +++ b/zebra/rt_netlink.c
>> @@ -539,10 +539,7 @@ netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
>>     ifa = NLMSG_DATA (h);
>>
>>     if (ifa->ifa_family != AF_INET
>> -#ifdef HAVE_IPV6
>> -      && ifa->ifa_family != AF_INET6
>> -#endif /* HAVE_IPV6 */
>> -    )
>> +      && ifa->ifa_family != AF_INET6)
>>       return 0;
>>
>>     if (h->nlmsg_type != RTM_NEWADDR && h->nlmsg_type != RTM_DELADDR)
>> @@ -641,7 +638,6 @@ netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
>>                                  (struct in_addr *) addr, ifa->ifa_prefixlen,
>>                                  (struct in_addr *) broad);
>>       }
>> -#ifdef HAVE_IPV6
>>     if (ifa->ifa_family == AF_INET6)
>>       {
>>         if (h->nlmsg_type == RTM_NEWADDR)
>> @@ -653,7 +649,6 @@ netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
>>                                  (struct in6_addr *) addr, ifa->ifa_prefixlen,
>>                                  (struct in6_addr *) broad);
>>       }
>> -#endif /* HAVE_IPV6 */
>>
>>     return 0;
>>   }
>> @@ -800,7 +795,6 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
>>               rib_add_ipv4_multipath (&p, rib, SAFI_UNICAST);
>>           }
>>       }
>> -#ifdef HAVE_IPV6
>>     if (rtm->rtm_family == AF_INET6)
>>       {
>>         struct prefix_ipv6 p;
>> @@ -811,7 +805,6 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
>>         rib_add_ipv6 (ZEBRA_ROUTE_KERNEL, flags, &p, gate, index, table,
>>   		    metric, 0, SAFI_UNICAST);
>>       }
>> -#endif /* HAVE_IPV6 */
>>
>>     return 0;
>>   }
>> @@ -1006,7 +999,6 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
>>           rib_delete_ipv4 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, table, SAFI_UNICAST);
>>       }
>>
>> -#ifdef HAVE_IPV6
>>     if (rtm->rtm_family == AF_INET6)
>>       {
>>         struct prefix_ipv6 p;
>> @@ -1033,7 +1025,6 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
>>         else
>>           rib_delete_ipv6 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, table, SAFI_UNICAST);
>>       }
>> -#endif /* HAVE_IPV6 */
>>
>>     return 0;
>>   }
>> @@ -1202,7 +1193,6 @@ interface_lookup_netlink (void)
>>     if (ret < 0)
>>       return ret;
>>
>> -#ifdef HAVE_IPV6
>>     /* Get IPv6 address of the interfaces. */
>>     ret = netlink_request (AF_INET6, RTM_GETADDR, &netlink_cmd);
>>     if (ret < 0)
>> @@ -1210,7 +1200,6 @@ interface_lookup_netlink (void)
>>     ret = netlink_parse_info (netlink_interface_addr, &netlink_cmd);
>>     if (ret < 0)
>>       return ret;
>> -#endif /* HAVE_IPV6 */
>>
>>     return 0;
>>   }
>> @@ -1230,7 +1219,6 @@ netlink_route_read (void)
>>     if (ret < 0)
>>       return ret;
>>
>> -#ifdef HAVE_IPV6
>>     /* Get IPv6 routing table. */
>>     ret = netlink_request (AF_INET6, RTM_GETROUTE, &netlink_cmd);
>>     if (ret < 0)
>> @@ -1238,7 +1226,6 @@ netlink_route_read (void)
>>     ret = netlink_parse_info (netlink_routing_table, &netlink_cmd);
>>     if (ret < 0)
>>       return ret;
>> -#endif /* HAVE_IPV6 */
>>
>>     return 0;
>>   }
>> @@ -1480,7 +1467,6 @@ _netlink_route_build_singlepath(
>>                      inet_ntoa (nexthop->gate.ipv4),
>>                      nexthop->ifindex);
>>       }
>> -#ifdef HAVE_IPV6
>>     if (nexthop->type == NEXTHOP_TYPE_IPV6
>>         || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME
>>         || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
>> @@ -1495,7 +1481,6 @@ _netlink_route_build_singlepath(
>>                      inet6_ntoa (nexthop->gate.ipv6),
>>                      nexthop->ifindex);
>>       }
>> -#endif /* HAVE_IPV6 */
>>     if (nexthop->type == NEXTHOP_TYPE_IFINDEX
>>         || nexthop->type == NEXTHOP_TYPE_IFNAME
>>         || nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
>> @@ -1573,7 +1558,6 @@ _netlink_route_build_multipath(
>>                      inet_ntoa (nexthop->gate.ipv4),
>>                      nexthop->ifindex);
>>       }
>> -#ifdef HAVE_IPV6
>>     if (nexthop->type == NEXTHOP_TYPE_IPV6
>>         || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME
>>         || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
>> @@ -1588,7 +1572,6 @@ _netlink_route_build_multipath(
>>                      inet6_ntoa (nexthop->gate.ipv6),
>>                      nexthop->ifindex);
>>       }
>> -#endif /* HAVE_IPV6 */
>>     /* ifindex */
>>     if (nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX
>>         || nexthop->type == NEXTHOP_TYPE_IFINDEX
>> @@ -1639,12 +1622,9 @@ _netlink_route_debug(
>>         zlog_debug ("netlink_route_multipath() (%s): %s %s/%d type %s",
>>            routedesc,
>>            lookup (nlmsg_str, cmd),
>> -#ifdef HAVE_IPV6
>> -         (family == AF_INET) ? inet_ntoa (p->u.prefix4) :
>> -         inet6_ntoa (p->u.prefix6),
>> -#else
>> +         (family == AF_INET) ? inet_ntoa (p->u.prefix4)
>> +                             : inet6_ntoa (p->u.prefix6),
>>            inet_ntoa (p->u.prefix4),
>> -#endif /* HAVE_IPV6 */
>>            p->prefixlen, nexthop_type_to_str (nexthop->type));
>>       }
>>   }
>> @@ -1757,7 +1737,7 @@ netlink_route_multipath (int cmd, struct prefix *p, struct rib *rib,
>>                 _netlink_route_build_singlepath(routedesc, bytelen,
>>                                                 nexthop, &req.n, &req.r,
>>                                                 sizeof req);
>> -
>> +
>>                 if (cmd == RTM_NEWROUTE)
>>                   SET_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB);
>>
>> @@ -1798,6 +1778,7 @@ netlink_route_multipath (int cmd, struct prefix *p, struct rib *rib,
>>                                      routedesc, family);
>>                 _netlink_route_build_multipath(routedesc, bytelen,
>>                                                nexthop, rta, rtnh, &src);
>> +
>>                 rtnh = RTNH_NEXT (rtnh);
>>
>>                 if (cmd == RTM_NEWROUTE)
>> @@ -1842,7 +1823,6 @@ kernel_delete_ipv4 (struct prefix *p, struct rib *rib)
>>     return netlink_route_multipath (RTM_DELROUTE, p, rib, AF_INET);
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   int
>>   kernel_add_ipv6 (struct prefix *p, struct rib *rib)
>>   {
>> @@ -1863,7 +1843,6 @@ kernel_delete_ipv6_old (struct prefix_ipv6 *dest, struct in6_addr *gate,
>>     return netlink_route (RTM_DELROUTE, AF_INET6, &dest->prefix,
>>                           dest->prefixlen, gate, index, flags, table);
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   /* Interface address modification. */
>>   static int
>> @@ -1979,9 +1958,7 @@ kernel_init (void)
>>     unsigned long groups;
>>
>>     groups = RTMGRP_LINK | RTMGRP_IPV4_ROUTE | RTMGRP_IPV4_IFADDR;
>> -#ifdef HAVE_IPV6
>>     groups |= RTMGRP_IPV6_ROUTE | RTMGRP_IPV6_IFADDR;
>> -#endif /* HAVE_IPV6 */
>>     netlink_socket (&netlink, groups);
>>     netlink_socket (&netlink_cmd, 0);
>>
>> diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
>> index 90ed73d..8aec47c 100644
>> --- a/zebra/rt_socket.c
>> +++ b/zebra/rt_socket.c
>> @@ -244,7 +244,6 @@ kernel_delete_ipv4 (struct prefix *p, struct rib *rib)
>>     return route;
>>   }
>>
>> -#ifdef HAVE_IPV6
>>
>>   /* Calculate sin6_len value for netmask socket value. */
>>   static int
>> @@ -495,4 +494,3 @@ kernel_delete_ipv6_old (struct prefix_ipv6 *dest, struct in6_addr *gate,
>>
>>     return route;
>>   }
>> -#endif /* HAVE_IPV6 */
>> diff --git a/zebra/rtadv.c b/zebra/rtadv.c
>> index 21ca6da..f67840d 100644
>> --- a/zebra/rtadv.c
>> +++ b/zebra/rtadv.c
>> @@ -40,7 +40,7 @@
>>
>>   extern struct zebra_privs_t zserv_privs;
>>
>> -#if defined (HAVE_IPV6) && defined (RTADV)
>> +#if defined (RTADV)
>>
>>   #ifdef OPEN_BSD
>>   #include <netinet/icmp6.h>
>> @@ -1781,4 +1781,4 @@ rtadv_init (void)
>>   {
>>     /* Empty.*/;
>>   }
>> -#endif /* RTADV && HAVE_IPV6 */
>> +#endif /* RTADV */
>> diff --git a/zebra/rtread_proc.c b/zebra/rtread_proc.c
>> index 07e8491..196d4e0 100644
>> --- a/zebra/rtread_proc.c
>> +++ b/zebra/rtread_proc.c
>> @@ -103,7 +103,6 @@ proc_route_read (void)
>>     return 0;
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   static int
>>   proc_ipv6_route_read ()
>>   {
>> @@ -163,13 +162,10 @@ proc_ipv6_route_read ()
>>     fclose (fp);
>>     return 0;
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   void
>>   route_read (void)
>>   {
>>     proc_route_read ();
>> -#ifdef HAVE_IPV6
>>     proc_ipv6_route_read ();
>> -#endif /* HAVE_IPV6 */
>>   }
>> diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c
>> index b5f2b76..3d1266a 100644
>> --- a/zebra/zebra_fpm_netlink.c
>> +++ b/zebra/zebra_fpm_netlink.c
>> @@ -49,10 +49,8 @@ addr_to_a (u_char af, void *addr)
>>       case AF_INET:
>>         return inet_ntoa (*((struct in_addr *) addr));
>>
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         return inet6_ntoa (*((struct in6_addr *) addr));
>> -#endif
>>
>>       default:
>>         return "<Addr in unknown AF>";
>> @@ -88,10 +86,8 @@ af_addr_size (u_char af)
>>       case AF_INET:
>>         return 4;
>>
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         return 16;
>> -#endif
>>
>>       default:
>>         assert(0);
>> @@ -176,14 +172,12 @@ netlink_route_info_add_nh (netlink_route_info_t *ri, struct nexthop *nexthop,
>>   	src = &nexthop->src;
>>       }
>>
>> -#ifdef HAVE_IPV6
>>     if (nexthop->type == NEXTHOP_TYPE_IPV6
>>         || nexthop->type == NEXTHOP_TYPE_IPV6_IFNAME
>>         || nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX)
>>       {
>>         nhi.gateway = &nexthop->gate;
>>       }
>> -#endif /* HAVE_IPV6 */
>>
>>     if (nexthop->type == NEXTHOP_TYPE_IFINDEX
>>         || nexthop->type == NEXTHOP_TYPE_IFNAME)
>> diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
>> index dc7e1ca..5e3acb5 100644
>> --- a/zebra/zebra_rib.c
>> +++ b/zebra/zebra_rib.c
>> @@ -326,7 +326,6 @@ nexthop_ipv4_ifindex_add (struct rib *rib, struct in_addr *ipv4,
>>     return nexthop;
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   struct nexthop *
>>   nexthop_ipv6_add (struct rib *rib, struct in6_addr *ipv6)
>>   {
>> @@ -372,7 +371,6 @@ nexthop_ipv6_ifindex_add (struct rib *rib, struct in6_addr *ipv6,
>>
>>     return nexthop;
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   struct nexthop *
>>   nexthop_blackhole_add (struct rib *rib)
>> @@ -547,7 +545,6 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
>>     return 0;
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   /* If force flag is not set, do not modify falgs at all for uninstall
>>      the route from FIB. */
>>   static int
>> @@ -682,7 +679,6 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
>>       }
>>     return 0;
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   struct rib *
>>   rib_match_ipv4 (struct in_addr addr)
>> @@ -868,7 +864,6 @@ rib_lookup_ipv4_route (struct prefix_ipv4 *p, union sockunion * qgate)
>>     return ZEBRA_RIB_NOTFOUND;
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   struct rib *
>>   rib_match_ipv6 (struct in6_addr *addr)
>>   {
>> @@ -931,7 +926,6 @@ rib_match_ipv6 (struct in6_addr *addr)
>>       }
>>     return NULL;
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   #define RIB_SYSTEM_ROUTE(R) \
>>           ((R)->type == ZEBRA_ROUTE_KERNEL || (R)->type == ZEBRA_ROUTE_CONNECT)
>> @@ -992,7 +986,6 @@ nexthop_active_check (struct route_node *rn, struct rib *rib,
>>         else
>>   	UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
>>         break;
>> -#ifdef HAVE_IPV6
>>       case NEXTHOP_TYPE_IPV6:
>>         family = AFI_IP6;
>>         if (nexthop_active_ipv6 (rib, nexthop, set, rn))
>> @@ -1018,7 +1011,6 @@ nexthop_active_check (struct route_node *rn, struct rib *rib,
>>   	    UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
>>   	}
>>         break;
>> -#endif /* HAVE_IPV6 */
>>       case NEXTHOP_TYPE_BLACKHOLE:
>>         SET_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE);
>>         break;
>> @@ -1109,11 +1101,9 @@ rib_install_kernel (struct route_node *rn, struct rib *rib)
>>       case AF_INET:
>>         ret = kernel_add_ipv4 (&rn->p, rib);
>>         break;
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         ret = kernel_add_ipv6 (&rn->p, rib);
>>         break;
>> -#endif /* HAVE_IPV6 */
>>       }
>>
>>     /* This condition is never met, if we are using rt_socket.c */
>> @@ -1143,11 +1133,9 @@ rib_uninstall_kernel (struct route_node *rn, struct rib *rib)
>>       case AF_INET:
>>         ret = kernel_delete_ipv4 (&rn->p, rib);
>>         break;
>> -#ifdef HAVE_IPV6
>>       case AF_INET6:
>>         ret = kernel_delete_ipv6 (&rn->p, rib);
>>         break;
>> -#endif /* HAVE_IPV6 */
>>       }
>>
>>     for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing))
>> @@ -2596,8 +2584,6 @@ static_delete_ipv4 (struct prefix *p, struct in_addr *gate, const char *ifname,
>>     return 1;
>>   }
>>
>> -
>> -#ifdef HAVE_IPV6
>>   static int
>>   rib_bogus_ipv6 (int type, struct prefix_ipv6 *p,
>>   		struct in6_addr *gate, unsigned int ifindex, int table)
>> @@ -3154,7 +3140,6 @@ static_delete_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
>>
>>     return 1;
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   /* RIB update function. */
>>   void
>> diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c
>> index b0dca08..0726761 100644
>> --- a/zebra/zebra_routemap.c
>> +++ b/zebra/zebra_routemap.c
>> @@ -637,10 +637,7 @@ route_set_src_compile (const char *arg)
>>     union g_addr src, *psrc;
>>
>>     if (inet_pton(AF_INET, arg, &src.ipv4) != 1
>> -#ifdef HAVE_IPV6
>> -      && inet_pton(AF_INET6, arg, &src.ipv6) != 1
>> -#endif /* HAVE_IPV6 */
>> -     )
>> +      && inet_pton(AF_INET6, arg, &src.ipv6) != 1)
>>       return NULL;
>>
>>     psrc = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (union g_addr));
>> diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
>> index baa60db..620d274 100644
>> --- a/zebra/zebra_vty.c
>> +++ b/zebra/zebra_vty.c
>> @@ -633,7 +633,6 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn)
>>                       vty_out (vty, ", src %s", addrstr);
>>                   }
>>                 break;
>> -#ifdef HAVE_IPV6
>>               case NEXTHOP_TYPE_IPV6:
>>               case NEXTHOP_TYPE_IPV6_IFINDEX:
>>               case NEXTHOP_TYPE_IPV6_IFNAME:
>> @@ -644,7 +643,6 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn)
>>                       vty_out (vty, ", src %s", addrstr);
>>                   }
>>                 break;
>> -#endif /* HAVE_IPV6 */
>>               default:
>>   	       break;
>>               }
>> @@ -730,7 +728,6 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct rib *rib)
>>                     vty_out (vty, ", src %s", buf);
>>                 }
>>               break;
>> -#ifdef HAVE_IPV6
>>             case NEXTHOP_TYPE_IPV6:
>>             case NEXTHOP_TYPE_IPV6_IFINDEX:
>>             case NEXTHOP_TYPE_IPV6_IFNAME:
>> @@ -740,7 +737,6 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct rib *rib)
>>                     vty_out (vty, ", src %s", buf);
>>                 }
>>               break;
>> -#endif /* HAVE_IPV6 */
>>             default:
>>   	    break;
>>           }
>> @@ -1210,8 +1206,6 @@ DEFUN (show_ip_mroute,
>>     return CMD_SUCCESS;
>>   }
>>
>> -
>> -#ifdef HAVE_IPV6
>>   /* General fucntion for IPv6 static route. */
>>   static int
>>   static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,
>> @@ -2014,7 +2008,6 @@ static_config_ipv6 (struct vty *vty)
>>         }
>>     return write;
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   /* Static ip route configuration write function. */
>>   static int
>> @@ -2023,9 +2016,7 @@ zebra_ip_config (struct vty *vty)
>>     int write = 0;
>>
>>     write += static_config_ipv4 (vty);
>> -#ifdef HAVE_IPV6
>>     write += static_config_ipv6 (vty);
>> -#endif /* HAVE_IPV6 */
>>
>>     return write;
>>   }
>> @@ -2107,8 +2098,6 @@ zebra_vty_init (void)
>>     install_element (VIEW_NODE, &show_ip_mroute_cmd);
>>     install_element (ENABLE_NODE, &show_ip_mroute_cmd);
>>
>> -
>> -#ifdef HAVE_IPV6
>>     install_element (CONFIG_NODE, &ipv6_route_cmd);
>>     install_element (CONFIG_NODE, &ipv6_route_flags_cmd);
>>     install_element (CONFIG_NODE, &ipv6_route_ifname_cmd);
>> @@ -2140,5 +2129,4 @@ zebra_vty_init (void)
>>
>>     install_element (VIEW_NODE, &show_ipv6_mroute_cmd);
>>     install_element (ENABLE_NODE, &show_ipv6_mroute_cmd);
>> -#endif /* HAVE_IPV6 */
>>   }
>> diff --git a/zebra/zserv.c b/zebra/zserv.c
>> index ca17c2c..dbb5f2c 100644
>> --- a/zebra/zserv.c
>> +++ b/zebra/zserv.c
>> @@ -409,13 +409,11 @@ zsend_route_multipath (int cmd, struct zserv *client, struct prefix *p,
>>                 case NEXTHOP_TYPE_IPV4_IFINDEX:
>>                   stream_put_in_addr (s, &nexthop->gate.ipv4);
>>                   break;
>> -#ifdef HAVE_IPV6
>>                 case NEXTHOP_TYPE_IPV6:
>>                 case NEXTHOP_TYPE_IPV6_IFINDEX:
>>                 case NEXTHOP_TYPE_IPV6_IFNAME:
>>                   stream_write (s, (u_char *) &nexthop->gate.ipv6, 16);
>>                   break;
>> -#endif
>>                 default:
>>                   if (cmd == ZEBRA_IPV4_ROUTE_ADD
>>                       || cmd == ZEBRA_IPV4_ROUTE_DELETE)
>> @@ -462,7 +460,6 @@ zsend_route_multipath (int cmd, struct zserv *client, struct prefix *p,
>>     return zebra_server_send_message(client);
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   static int
>>   zsend_ipv6_nexthop_lookup (struct zserv *client, struct in6_addr *addr)
>>   {
>> @@ -528,7 +525,6 @@ zsend_ipv6_nexthop_lookup (struct zserv *client, struct in6_addr *addr)
>>
>>     return zebra_server_send_message(client);
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   static int
>>   zsend_ipv4_nexthop_lookup (struct zserv *client, struct in_addr addr)
>> @@ -933,7 +929,6 @@ zread_ipv4_import_lookup (struct zserv *client, u_short length)
>>     return zsend_ipv4_import_lookup (client, &p);
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   /* Zebra server IPv6 prefix add function. */
>>   static int
>>   zread_ipv6_add (struct zserv *client, u_short length)
>> @@ -1080,7 +1075,6 @@ zread_ipv6_nexthop_lookup (struct zserv *client, u_short length)
>>
>>     return zsend_ipv6_nexthop_lookup (client, &addr);
>>   }
>> -#endif /* HAVE_IPV6 */
>>
>>   /* Register zebra server router-id information.  Send current router-id */
>>   static int
>> @@ -1329,14 +1323,12 @@ zebra_client_read (struct thread *thread)
>>       case ZEBRA_IPV4_ROUTE_DELETE:
>>         zread_ipv4_delete (client, length);
>>         break;
>> -#ifdef HAVE_IPV6
>>       case ZEBRA_IPV6_ROUTE_ADD:
>>         zread_ipv6_add (client, length);
>>         break;
>>       case ZEBRA_IPV6_ROUTE_DELETE:
>>         zread_ipv6_delete (client, length);
>>         break;
>> -#endif /* HAVE_IPV6 */
>>       case ZEBRA_REDISTRIBUTE_ADD:
>>         zebra_redistribute_add (command, client, length);
>>         break;
>> @@ -1352,11 +1344,9 @@ zebra_client_read (struct thread *thread)
>>       case ZEBRA_IPV4_NEXTHOP_LOOKUP:
>>         zread_ipv4_nexthop_lookup (client, length);
>>         break;
>> -#ifdef HAVE_IPV6
>>       case ZEBRA_IPV6_NEXTHOP_LOOKUP:
>>         zread_ipv6_nexthop_lookup (client, length);
>>         break;
>> -#endif /* HAVE_IPV6 */
>>       case ZEBRA_IPV4_IMPORT_LOOKUP:
>>         zread_ipv4_import_lookup (client, length);
>>         break;
>> @@ -1678,7 +1668,6 @@ DEFUN (show_ip_forwarding,
>>     return CMD_SUCCESS;
>>   }
>>
>> -#ifdef HAVE_IPV6
>>   /* Only display ipv6 forwarding is enabled or not. */
>>   DEFUN (show_ipv6_forwarding,
>>          show_ipv6_forwarding_cmd,
>> @@ -1752,8 +1741,6 @@ DEFUN (no_ipv6_forwarding,
>>     return CMD_SUCCESS;
>>   }
>>
>> -#endif /* HAVE_IPV6 */
>> -
>>   /* IPForwarding configuration write function. */
>>   static int
>>   config_write_forwarding (struct vty *vty)
>> @@ -1763,10 +1750,8 @@ config_write_forwarding (struct vty *vty)
>>
>>     if (ipforward ())
>>       vty_out (vty, "ip forwarding%s", VTY_NEWLINE);
>> -#ifdef HAVE_IPV6
>>     if (ipforward_ipv6 ())
>>       vty_out (vty, "ipv6 forwarding%s", VTY_NEWLINE);
>> -#endif /* HAVE_IPV6 */
>>     vty_out (vty, "!%s", VTY_NEWLINE);
>>     return 0;
>>   }
>> @@ -1803,12 +1788,10 @@ zebra_init (void)
>>     install_element (CONFIG_NODE, &config_table_cmd);
>>   #endif /* HAVE_NETLINK */
>>
>> -#ifdef HAVE_IPV6
>>     install_element (VIEW_NODE, &show_ipv6_forwarding_cmd);
>>     install_element (ENABLE_NODE, &show_ipv6_forwarding_cmd);
>>     install_element (CONFIG_NODE, &ipv6_forwarding_cmd);
>>     install_element (CONFIG_NODE, &no_ipv6_forwarding_cmd);
>> -#endif /* HAVE_IPV6 */
>>
>>     /* Route-map */
>>     zebra_route_map_init ();
>>
>> regards,
>> --
>> Paul Jakma	paul at jakma.org	@pjakma	Key ID: 64A2FF6A
>> Fortune:
>> Bank error in your favor.  Collect $200.
>>
>> _______________________________________________
>> Quagga-dev mailing list
>> Quagga-dev at lists.quagga.net
>> https://lists.quagga.net/mailman/listinfo/quagga-dev
>
> _______________________________________________
> Quagga-dev mailing list
> Quagga-dev at lists.quagga.net
> https://lists.quagga.net/mailman/listinfo/quagga-dev
>

-- 
Paul Jakma	paul at jakma.org	@pjakma	Key ID: 64A2FF6A
Fortune:
Q:	How many college football players does it take to screw in a light bulb?
A:	Only one, but he gets three credits for it.




More information about the Quagga-dev mailing list