From: Donald Sharp Date: Fri, 5 Jun 2015 19:15:44 +0000 (-0700) Subject: pim_mroute.h has a different version of code than linux/mroute.h provides X-Git-Tag: frr-2.0-rc1~864 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a724477d97709001bce8b004632d9e1e5adb36be;p=matthieu%2Ffrr.git pim_mroute.h has a different version of code than linux/mroute.h provides 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 --- diff --git a/configure.ac b/configure.ac index a3a58df867..c4787f9e70 100755 --- a/configure.ac +++ b/configure.ac @@ -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 +#endif]) AC_MSG_CHECKING([for BSD struct ip_mreq hack]) AC_TRY_COMPILE([#ifdef HAVE_SYS_PARAM_H #include diff --git a/pimd/pim_mroute.h b/pimd/pim_mroute.h index 350b1e373e..125d1901bf 100644 --- a/pimd/pim_mroute.h +++ b/pimd/pim_mroute.h @@ -40,6 +40,9 @@ #define PIM_MROUTE_MIN_TTL (1) +#if defined(HAVE_LINUX_MROUTE_H) +#include +#else /* Below: from */ @@ -154,6 +157,7 @@ struct igmpmsg struct in_addr im_src,im_dst; }; #endif +#endif /* Above: from