]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: supply VIFF_USE_IFINDEX definition
authorDavid Lamparter <david@opensourcerouting.org>
Wed, 27 Jul 2016 18:02:54 +0000 (20:02 +0200)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Wed, 27 Jul 2016 18:20:51 +0000 (14:20 -0400)
This fixes compilation if the system libc doesn't have VIFF_USE_IFINDEX.
It'll still break runtime if the kernel is older than 2.6.32.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
pimd/pim_iface.c

index 1dfbd9990a5e0535b6e1a45fb40b98e3e48b0bec..14c8c7262e84af687599da760534057ec56835d5 100644 (file)
 #include "pim_time.h"
 #include "pim_ssmpingd.h"
 
+#ifndef VIFF_USE_IFINDEX
+# ifdef linux
+/* make it work compile-time - whether it works runtime depends on the user
+ * having 2.6.32 or newer */
+#  define VIFF_USE_IFINDEX        0x8
+# else
+#  error no VIFF_USE_IFINDEX on this system, code needs porting
+/* NB: without VIFF_USE_IFINDEX, the local IP address is used to identify
+ * interfaces, which means it's impossible to support multiple interfaces that
+ * have the same or no IP address (e.g. unnumbered) */
+# endif
+#endif
+
 struct interface *pim_regiface = NULL;
 
 static void pim_if_igmp_join_del_all(struct interface *ifp);