diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-20 08:21:00 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-20 08:21:00 -0400 |
| commit | 76981cd383e4bed69454bcc4151a0aae89e8ca84 (patch) | |
| tree | 9004d3343b6e37edd4273d6ba85bd53cfdc28afa | |
| parent | 85b62aeab3d66d57e88b2cf5577df589e60133b9 (diff) | |
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>
| -rwxr-xr-x | configure.ac | 6 | ||||
| -rw-r--r-- | zebra/rt_netlink.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e7ca6015d2..1f7d59d3aa 100755 --- a/configure.ac +++ b/configure.ac @@ -320,6 +320,8 @@ AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror], [enable -Werror (recommended for developers only)])) AC_ARG_ENABLE(cumulus, AS_HELP_STRING([--enable-cumulus], [enable Cumulus Switch Special Extensions])) +AC_ARG_ENABLE(rr-semantics, + AS_HELP_STRING([--disable-rr-semantics], [disable the v6 Route Replace semantics])) AC_CHECK_HEADERS(json-c/json.h) AC_CHECK_LIB(json-c, json_object_get, LIBS="$LIBS -ljson-c") @@ -354,6 +356,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 diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index b0e680b7a9..0e336fe974 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -2299,7 +2299,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 |
