quagga: Allow compile time determination of v6 RR semantics

The patches to allow kernel v6 Route Replacement semantics
to work correctly are on a very recent kernel.  If you are
compiling on a linux kernel where it's broken, just
compile with --disable-rr-semantics.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 76981cd383)
This commit is contained in:
Donald Sharp 2016-06-20 08:21:00 -04:00
parent 530d701611
commit 6776485dee
2 changed files with 11 additions and 0 deletions

View File

@ -304,6 +304,8 @@ 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])
AC_ARG_ENABLE(rr-semantics,
AS_HELP_STRING([--disable-rr-semantics], [disable the v6 Route Replace semantics]))
if test x"${enable_gcc_ultra_verbose}" = x"yes" ; then
CFLAGS="${CFLAGS} -W -Wcast-qual -Wstrict-prototypes"
@ -345,6 +347,10 @@ case "${enable_systemd}" in
"*") ;;
esac
if test "${enable_rr_semantics}" != "no" ; then
AC_DEFINE(HAVE_V6_RR_SEMANTICS,, Compile in v6 Route Replacement Semantics)
fi
if test "${enable_poll}" = "yes" ; then
AC_DEFINE(HAVE_POLL,,Compile systemd support in)
fi

View File

@ -2390,7 +2390,12 @@ kernel_add_ipv6 (struct prefix *p, struct rib *rib)
int
kernel_update_ipv6 (struct prefix *p, struct rib *rib)
{
#if defined (HAVE_V6_RR_SEMANTICS)
return netlink_route_multipath (RTM_NEWROUTE, p, rib, AF_INET6, 1);
#else
kernel_delete_ipv6 (p, rib);
return kernel_add_ipv6 (p, rib);
#endif
}
int