chiark / gitweb /
missing.h: add NDA_*
authorMichael Olbrich <m.olbrich@pengutronix.de>
Mon, 9 Mar 2015 11:27:25 +0000 (12:27 +0100)
committerTom Gundersen <teg@jklm.no>
Mon, 9 Mar 2015 13:06:20 +0000 (14:06 +0100)
This is necessary to build with older kernel headers. NDA_VLAN was
introduced in v3.9 and NDA_PORT, NDA_VNI and NDA_IFINDEX in v3.10

configure.ac
src/shared/missing.h

index 14518bc52b1dd60fd7a2e1d4c776a8807170c529..29111f5fee84fc6bfa8039f239e19125ffa36ce0 100644 (file)
@@ -333,7 +333,8 @@ AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
                 IFLA_VXLAN_LOCAL6,
                 IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
                 IFLA_BRIDGE_VLAN_INFO,
                 IFLA_VXLAN_LOCAL6,
                 IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
                 IFLA_BRIDGE_VLAN_INFO,
-                IFLA_BRPORT_UNICAST_FLOOD],
+                IFLA_BRPORT_UNICAST_FLOOD,
+                NDA_IFINDEX],
 [], [], [[
 #include <inttypes.h>
 #include <netinet/in.h>
 [], [], [[
 #include <inttypes.h>
 #include <netinet/in.h>
@@ -344,6 +345,7 @@ AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
 #include <linux/if_tunnel.h>
 #include <linux/if_link.h>
 #include <linux/if_bridge.h>
 #include <linux/if_tunnel.h>
 #include <linux/if_link.h>
 #include <linux/if_bridge.h>
+#include <linux/neighbour.h>
 ]])
 
 # This makes sure pkg.m4 is available.
 ]])
 
 # This makes sure pkg.m4 is available.
index e72631e130d997652bfbd1e79e9f05b7d80dd467..802b4957e0a1f3f7d943a6efac7b9ed8b1dc6898 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/loop.h>
 #include <linux/audit.h>
 #include <linux/capability.h>
 #include <linux/loop.h>
 #include <linux/audit.h>
 #include <linux/capability.h>
+#include <linux/neighbour.h>
 
 #ifdef HAVE_AUDIT
 #include <libaudit.h>
 
 #ifdef HAVE_AUDIT
 #include <libaudit.h>
@@ -623,6 +624,21 @@ static inline int setns(int fd, int nstype) {
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
 #endif
 
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
 #endif
 
+#if !HAVE_DECL_NDA_IFINDEX
+#define NDA_UNSPEC 0
+#define NDA_DST 1
+#define NDA_LLADDR 2
+#define NDA_CACHEINFO 3
+#define NDA_PROBES 4
+#define NDA_VLAN 5
+#define NDA_PORT 6
+#define NDA_VNI 7
+#define NDA_IFINDEX 8
+#define __NDA_MAX 9
+
+#define NDA_MAX (__NDA_MAX - 1)
+#endif
+
 #ifndef IPV6_UNICAST_IF
 #define IPV6_UNICAST_IF 76
 #endif
 #ifndef IPV6_UNICAST_IF
 #define IPV6_UNICAST_IF 76
 #endif