]> git.proxmox.com Git - mirror_frr.git/commitdiff
quagga: Allow compile time determination of v6 RR semantics
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 20 Jun 2016 12:21:00 +0000 (08:21 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 20 Jun 2016 13:06:07 +0000 (09:06 -0400)
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 76981cd383e4bed69454bcc4151a0aae89e8ca84)

configure.ac
zebra/rt_netlink.c

index 8758d9d3c15fca7193c0c57b8f2ee04e2d1533b2..8338ad146250708a340f90f16159e6a255b7179d 100755 (executable)
@@ -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
index e52fcd43428cfd96054b5e6f12a6866ec3096f70..1f7b1a9cff60a126247d447aeb6cba3e07ab4e73 100644 (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