]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pim_mroute.h has a different version of code than linux/mroute.h provides
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 5 Jun 2015 19:15:44 +0000 (12:15 -0700)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Thu, 26 May 2016 00:38:32 +0000 (20:38 -0400)
linux/mroutes.h and pim_mroute.h both have copies of the same structures.
This is causing failures in setsockopt(..., MRT_ADD_MFC,...) because
of data structure incompatibilities between the kernel and what
pim_mroute.h was providing.  Modify the code to check for mroute.h
and include it if necessary.  I did not modify the non linux/mroute.h
path because I do not have other systems to test on easily.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
configure.ac
pimd/pim_mroute.h

index a3a58df86796903b888207bc6bf0a85d0c413b25..c4787f9e709071fa0d96413e5cca2d6682c8555b 100755 (executable)
@@ -1017,6 +1017,11 @@ dnl figure out how to specify an interface in multicast sockets API
 dnl ---------------------------------------------------------------
 AC_CHECK_MEMBERS([struct ip_mreqn.imr_ifindex], [], [], QUAGGA_INCLUDES)
 
+AC_CHECK_HEADERS([linux/mroute.h], [], [],
+[
+#if HAVE_NETINET_IN_H
+#include<netinet/in.h>
+#endif])
 AC_MSG_CHECKING([for BSD struct ip_mreq hack])
 AC_TRY_COMPILE([#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
index 350b1e373eb7b3d3d370c7fd936c8496d02bfe47..125d1901bf965a578d9e0fa8bf4f879fe04c14f5 100644 (file)
@@ -40,6 +40,9 @@
 
 #define PIM_MROUTE_MIN_TTL (1)
 
+#if defined(HAVE_LINUX_MROUTE_H)
+#include <linux/mroute.h>
+#else
 /*
   Below: from <linux/mroute.h>
 */
@@ -154,6 +157,7 @@ struct igmpmsg
   struct in_addr im_src,im_dst;
 };
 #endif
+#endif
 
 /*
   Above: from <linux/mroute.h>