build: remove INRIA, NRL and MUSICA IPv6 quirks

Valar dohaeris.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index c052744..cea430c 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -488,7 +488,7 @@
 }
 
 /* IPv6 supported version of BGP server socket setup.  */
-#if defined (HAVE_IPV6) && ! defined (NRL)
+#ifdef HAVE_IPV6
 int
 bgp_socket (unsigned short port, const char *address)
 {
@@ -588,7 +588,7 @@
     }
   return sock;
 }
-#endif /* HAVE_IPV6 && !NRL */
+#endif /* HAVE_IPV6 */
 
 void
 bgp_close (void)
diff --git a/configure.ac b/configure.ac
index b9001b3..6684946 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1054,21 +1054,10 @@
 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 ---------
 dnl KAME IPv6
 dnl ---------
-  elif grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then
+  if 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)
@@ -1078,32 +1067,6 @@
       LIB_IPV6="-L/usr/local/v6/lib -linet6"
     fi
     AC_MSG_RESULT(KAME)
-dnl -------------------------
-dnl MUSICA IPv6
-dnl  default host check
-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
-    AC_MSG_RESULT(MUSICA)
-dnl ---------
-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"
-    AC_MSG_RESULT(NRL)
 dnl ------------------------------------
 dnl Solaris 9, 10 and potentially higher
 dnl ------------------------------------
diff --git a/lib/sockunion.c b/lib/sockunion.c
index 5dcf725..1a355d3 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -304,13 +304,8 @@
 	{
 #ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
 	  /* su.sin6.sin6_scope_id = ifindex; */
-#ifdef MUSICA
-	  su.sin6.sin6_scope_id = ifindex; 
-#endif
 #endif /* HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID */
-#ifndef MUSICA
 	  SET_IN6_LINKLOCAL_IFINDEX (su.sin6.sin6_addr, ifindex);
-#endif
 	}
 #endif /* KAME */
       break;
@@ -394,7 +389,7 @@
 #endif /* SIN6_LEN */
       if (su_addr == NULL)
 	{
-#if defined(LINUX_IPV6) || defined(NRL)
+#ifdef LINUX_IPV6
 	  memset (&su->sin6.sin6_addr, 0, sizeof (struct in6_addr));
 #else
 	  su->sin6.sin6_addr = in6addr_any;
diff --git a/lib/vty.c b/lib/vty.c
index b8db7c8..750f885 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1775,7 +1775,7 @@
   return 0;
 }
 
-#if defined(HAVE_IPV6) && !defined(NRL)
+#ifdef HAVE_IPV6
 static void
 vty_serv_sock_addrinfo (const char *hostname, unsigned short port)
 {
@@ -1840,7 +1840,7 @@
 
   freeaddrinfo (ainfo_save);
 }
-#else /* HAVE_IPV6 && ! NRL */
+#else /* HAVE_IPV6 */
 
 /* Make vty server socket. */
 static void
@@ -1908,7 +1908,7 @@
   /* Add vty server event. */
   vty_event (VTY_SERV, accept_sock, NULL);
 }
-#endif /* HAVE_IPV6 && ! NRL */
+#endif /* HAVE_IPV6 */
 
 #ifdef VTYSH
 /* For sockaddr_un. */
@@ -2143,12 +2143,7 @@
     {
 
 #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 */
diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h
index 78ae1a1..4122b30 100644
--- a/ospf6d/ospf6d.h
+++ b/ospf6d/ospf6d.h
@@ -30,12 +30,6 @@
 /* global variables */
 extern struct thread_master *master;
 
-#ifdef INRIA_IPV6
-#ifndef IPV6_PKTINFO
-#define IPV6_PKTINFO IPV6_RECVPKTINFO
-#endif /* IPV6_PKTINFO */
-#endif /* INRIA_IPV6 */
-
 /* Historical for KAME.  */
 #ifndef IPV6_JOIN_GROUP
 #ifdef IPV6_ADD_MEMBERSHIP
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 941c3a0..2dbbf9e 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -928,7 +928,7 @@
     return;
   if (IN6_IS_ADDR_LOOPBACK (&p->prefix))
     return;
-#if defined (MUSICA) || defined (LINUX)
+#ifdef LINUX
   /* XXX As long as the RIPng redistribution is applied to all the connected
    *     routes, one needs to filter the ::/96 prefixes.
    *     However it could be a wanted case, it will be removed soon.
@@ -936,7 +936,7 @@
   if ((IN6_IS_ADDR_V4COMPAT(&p->prefix)) ||
       (IN6_IS_ADDR_UNSPECIFIED (&p->prefix) && (p->prefixlen == 96)))
     return;
-#endif /* MUSICA or LINUX */
+#endif /* LINUX */
 
   rp = route_node_get (ripng->table, (struct prefix *) p);
   rinfo = rp->info;
@@ -1025,7 +1025,7 @@
     return;
   if (IN6_IS_ADDR_LOOPBACK (&p->prefix))
     return;
-#if defined (MUSICA) || defined (LINUX)
+#ifdef LINUX
   /* XXX As long as the RIPng redistribution is applied to all the connected
    *     routes, one needs to filter the ::/96 prefixes.
    *     However it could be a wanted case, it will be removed soon.
@@ -1033,7 +1033,7 @@
   if ((IN6_IS_ADDR_V4COMPAT(&p->prefix)) ||
       (IN6_IS_ADDR_UNSPECIFIED (&p->prefix) && (p->prefixlen == 96)))
     return;
-#endif /* MUSICA or LINUX */
+#endif /* LINUX */
 
   rp = route_node_lookup (ripng->table, (struct prefix *) p);
 
diff --git a/zebra/connected.c b/zebra/connected.c
index c4f87f4..2db981b 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -347,7 +347,7 @@
   /* Apply mask to the network. */
   apply_mask_ipv6 (&p);
 
-#if ! defined (MUSICA) && ! defined (LINUX)
+#ifndef LINUX
   /* XXX: It is already done by rib_bogus_ipv6 within rib_add_ipv6 */
   if (IN6_IS_ADDR_UNSPECIFIED (&p.prefix))
     return;
diff --git a/zebra/ipforward_sysctl.c b/zebra/ipforward_sysctl.c
index 8824418..57ed185 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
@@ -106,7 +102,7 @@
 {
   CTL_NET,
   PF_INET6,
-#if defined(KAME) || defined(NRL)
+#if defined(KAME)
   IPPROTO_IPV6,
   IPV6CTL_FORWARDING
 #else /* NOT KAME */
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 90ed73d..cde71ef 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -254,13 +254,8 @@
   char *p, *lim;
   int len;
 
-#if defined (INRIA)
-  if (IN_ANYADDR6 (mask)) 
-    return sizeof (long);
-#else /* ! INRIA */
   if (IN6_IS_ADDR_UNSPECIFIED (&mask)) 
     return sizeof (long);
-#endif /* ! INRIA */
 
   sin6.sin6_addr = mask;
   len = sizeof (struct sockaddr_in6);
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index effe233..31469ca 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2692,11 +2692,11 @@
 		struct in6_addr *gate, unsigned int ifindex, int table)
 {
   if (type == ZEBRA_ROUTE_CONNECT && IN6_IS_ADDR_UNSPECIFIED (&p->prefix)) {
-#if defined (MUSICA) || defined (LINUX)
+#ifdef LINUX
     /* IN6_IS_ADDR_V4COMPAT(&p->prefix) */
     if (p->prefixlen == 96)
       return 0;
-#endif /* MUSICA */
+#endif /* LINUX */
     return 1;
   }
   if (type == ZEBRA_ROUTE_KERNEL && IN6_IS_ADDR_UNSPECIFIED (&p->prefix)