zebra: Cleanup RTADV define
The RTADV define was not being set correctly or consistently.
Make the code consistent with our HAVE_IPV6 define.
If the user wants to explicitly turn it off then they should
run --disable-rtadv from the configure cli
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/zebra/interface.c b/zebra/interface.c
index 162439f..411712d 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -42,11 +42,11 @@
#include "zebra/debug.h"
#include "zebra/irdp.h"
-#ifdef RTADV
+#if defined (HAVE_RTADV)
/* Order is intentional. Matches RFC4191. This array is also used for
command matching, so only modify with care. */
const char *rtadv_pref_strs[] = { "medium", "high", "INVALID", "low", 0 };
-#endif /* RTADV */
+#endif /* HAVE_RTADV */
/* Called when new interface is added. */
static int
@@ -59,7 +59,7 @@
zebra_if->multicast = IF_ZEBRA_MULTICAST_UNSPEC;
zebra_if->shutdown = IF_ZEBRA_SHUTDOWN_OFF;
-#ifdef RTADV
+#if defined (HAVE_RTADV)
{
/* Set default router advertise values. */
struct rtadvconf *rtadv;
@@ -85,7 +85,7 @@
rtadv->AdvPrefixList = list_new ();
}
-#endif /* RTADV */
+#endif /* HAVE_RTADV */
/* Initialize installed address chains tree. */
zebra_if->ipv4_subnets = route_table_init ();
@@ -638,7 +638,7 @@
vty_out (vty, "%s", VTY_NEWLINE);
}
-#ifdef RTADV
+#if defined (HAVE_RTADV)
/* Dump interface ND information to vty. */
static void
nd_dump_vty (struct vty *vty, struct interface *ifp)
@@ -699,7 +699,7 @@
VTY_NEWLINE);
}
}
-#endif /* RTADV */
+#endif /* HAVE_RTADV */
/* Interface's information print out to vty interface. */
static void
@@ -806,9 +806,9 @@
connected_dump_vty (vty, connected);
}
-#ifdef RTADV
+#if defined (HAVE_RTADV)
nd_dump_vty (vty, ifp);
-#endif /* RTADV */
+#endif /* HAVE_RTADV */
#ifdef HAVE_PROC_NET_DEV
/* Statistics print out using proc file system. */
@@ -1782,9 +1782,9 @@
VTY_NEWLINE);
}
-#ifdef RTADV
+#if defined (HAVE_RTADV)
rtadv_config_write (vty, ifp);
-#endif /* RTADV */
+#endif /* HAVE_RTADV */
#ifdef HAVE_IRDP
irdp_config_write (vty, ifp);