Browse Source

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>
David Lamparter 5 years ago
parent
commit
6d6df30386
10 changed files with 15 additions and 77 deletions
  1. 2 2
      bgpd/bgp_network.c
  2. 1 38
      configure.ac
  3. 1 6
      lib/sockunion.c
  4. 3 8
      lib/vty.c
  5. 0 6
      ospf6d/ospf6d.h
  6. 4 4
      ripngd/ripngd.c
  7. 1 1
      zebra/connected.c
  8. 1 5
      zebra/ipforward_sysctl.c
  9. 0 5
      zebra/rt_socket.c
  10. 2 2
      zebra/zebra_rib.c

+ 2 - 2
bgpd/bgp_network.c

@@ -488,7 +488,7 @@ bgp_listener (int sock, struct sockaddr *sa, socklen_t salen)
 }
 
 /* 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 @@ bgp_socket (unsigned short port, const char *address)
     }
   return sock;
 }
-#endif /* HAVE_IPV6 && !NRL */
+#endif /* HAVE_IPV6 */
 
 void
 bgp_close (void)

+ 1 - 38
configure.ac

@@ -1054,21 +1054,10 @@ 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 ---------
 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 @@ dnl ---------
       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 ------------------------------------

+ 1 - 6
lib/sockunion.c

@@ -304,13 +304,8 @@ sockunion_connect (int fd, union sockunion *peersu, unsigned short port,
 	{
 #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 @@ sockunion_bind (int sock, union sockunion *su, unsigned short port,
 #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;

+ 3 - 8
lib/vty.c

@@ -1775,7 +1775,7 @@ vty_accept (struct thread *thread)
   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 @@ vty_serv_sock_addrinfo (const char *hostname, unsigned short port)
 
   freeaddrinfo (ainfo_save);
 }
-#else /* HAVE_IPV6 && ! NRL */
+#else /* HAVE_IPV6 */
 
 /* Make vty server socket. */
 static void
@@ -1908,7 +1908,7 @@ vty_serv_sock_family (const char* addr, unsigned short port, int family)
   /* 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 @@ vty_serv_sock (const char *addr, unsigned short port, const char *path)
     {
 
 #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 */

+ 0 - 6
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

+ 4 - 4
ripngd/ripngd.c

@@ -928,7 +928,7 @@ ripng_redistribute_add (int type, int sub_type, struct prefix_ipv6 *p,
     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 @@ ripng_redistribute_add (int type, int sub_type, struct prefix_ipv6 *p,
   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 @@ ripng_redistribute_delete (int type, int sub_type, struct prefix_ipv6 *p,
     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 @@ ripng_redistribute_delete (int type, int sub_type, struct prefix_ipv6 *p,
   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);
 

+ 1 - 1
zebra/connected.c

@@ -347,7 +347,7 @@ connected_up_ipv6 (struct interface *ifp, struct connected *ifc)
   /* 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;

+ 1 - 5
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 @@ int mib_ipv6[MIB_SIZ] =
 {
   CTL_NET,
   PF_INET6,
-#if defined(KAME) || defined(NRL)
+#if defined(KAME)
   IPPROTO_IPV6,
   IPV6CTL_FORWARDING
 #else /* NOT KAME */

+ 0 - 5
zebra/rt_socket.c

@@ -254,13 +254,8 @@ sin6_masklen (struct in6_addr mask)
   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);

+ 2 - 2
zebra/zebra_rib.c

@@ -2692,11 +2692,11 @@ rib_bogus_ipv6 (int type, struct prefix_ipv6 *p,
 		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)