debian, config, zebra: Ensure Cumulus Extensions are not auto turned on

There exist cases where Cumulus Code( in this case code surrounding
when we want to send Router Advertisements ) should only be
turned on for Cumulus Switches.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-02-21 12:43:50 -05:00
parent 3e66be2ee6
commit 000cf1fb35
3 changed files with 9 additions and 0 deletions

View file

@ -302,6 +302,8 @@ AC_ARG_ENABLE(systemd,
[ --enable-systemd enable Systemd support])
AC_ARG_ENABLE(werror,
AS_HELP_STRING([--enable-werror], [enable -Werror (recommended for developers only)]))
AC_ARG_ENABLE(cumulus,
[ --enable-cumulus enable Cumulus Switch Special Extensions])
if test x"${enable_gcc_ultra_verbose}" = x"yes" ; then
CFLAGS="${CFLAGS} -W -Wcast-qual -Wstrict-prototypes"
@ -329,6 +331,10 @@ if test "${enable_systemd}" = "yes" ; then
LIBS="$LIBS -lsystemd "
fi
if test "${enable_cumulus}" = "yes" ; then
AC_DEFINE(HAVE_CUMULUS,,Compile Special Cumulus Code in)
fi
if test "${enable_shell_access}" = "yes"; then
AC_DEFINE(HAVE_SHELL_ACCESS,,Allow user to use ssh/telnet/bash)
fi

1
debian/rules vendored
View file

@ -67,6 +67,7 @@ override_dh_auto_configure:
--enable-gcc-rdynamic \
--with-libpam \
--enable-systemd=yes \
--enable-cumulus=yes \
--enable-dependency-tracking; \
fi
if ! diff -b -IHAVE_SNMP -IHAVE_NETSNMP -IUCD_COMPAT -IGETIFADDR debian/my/config.h.reference config.h; then \

View file

@ -116,10 +116,12 @@ static inline int
interface_ipv6_auto_ra_allowed (struct interface *ifp)
{
#if defined (HAVE_RTADV)
#if defined (HAVE_CUMULUS)
if ((strncmp (ifp->name, "eth", strlen("eth")) == 0) ||
(strncmp (ifp->name, "lo", strlen("lo")) == 0) ||
(strncmp (ifp->name, "switch", strlen("switch")) == 0))
return 0;
#endif
return 1;
#else
return 0;