|
|
17b0f1 |
From eceb99d70a7c0916cb626dfbcb50894e1f4e9431 Mon Sep 17 00:00:00 2001
|
|
|
17b0f1 |
From: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
17b0f1 |
Date: Mon, 9 Mar 2015 12:27:25 +0100
|
|
|
17b0f1 |
Subject: [PATCH] missing.h: add NDA_*
|
|
|
17b0f1 |
|
|
|
17b0f1 |
This is necessary to build with older kernel headers. NDA_VLAN was
|
|
|
17b0f1 |
introduced in v3.9 and NDA_PORT, NDA_VNI and NDA_IFINDEX in v3.10
|
|
|
17b0f1 |
|
|
|
17b0f1 |
(cherry picked from commit cf1755bac0426132c21fdca519a336ce7d920277)
|
|
|
17b0f1 |
---
|
|
|
17b0f1 |
configure.ac | 4 +++-
|
|
|
17b0f1 |
src/shared/missing.h | 16 ++++++++++++++++
|
|
|
17b0f1 |
2 files changed, 19 insertions(+), 1 deletion(-)
|
|
|
17b0f1 |
|
|
|
17b0f1 |
diff --git a/configure.ac b/configure.ac
|
|
|
17b0f1 |
index 3201428c44..081ed0f6eb 100644
|
|
|
17b0f1 |
--- a/configure.ac
|
|
|
17b0f1 |
+++ b/configure.ac
|
|
|
17b0f1 |
@@ -334,7 +334,8 @@ AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
|
|
|
17b0f1 |
IFLA_VXLAN_LOCAL6,
|
|
|
17b0f1 |
IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
|
|
|
17b0f1 |
IFLA_BRIDGE_VLAN_INFO,
|
|
|
17b0f1 |
- IFLA_BRPORT_UNICAST_FLOOD],
|
|
|
17b0f1 |
+ IFLA_BRPORT_UNICAST_FLOOD,
|
|
|
17b0f1 |
+ NDA_IFINDEX],
|
|
|
17b0f1 |
[], [], [[
|
|
|
17b0f1 |
#include <inttypes.h>
|
|
|
17b0f1 |
#include <netinet/in.h>
|
|
|
17b0f1 |
@@ -345,6 +346,7 @@ AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
|
|
|
17b0f1 |
#include <linux/if_tunnel.h>
|
|
|
17b0f1 |
#include <linux/if_link.h>
|
|
|
17b0f1 |
#include <linux/if_bridge.h>
|
|
|
17b0f1 |
+#include <linux/neighbour.h>
|
|
|
17b0f1 |
]])
|
|
|
17b0f1 |
|
|
|
17b0f1 |
# This makes sure pkg.m4 is available.
|
|
|
17b0f1 |
diff --git a/src/shared/missing.h b/src/shared/missing.h
|
|
|
17b0f1 |
index 8cb0b2c96e..6ef4dbdf43 100644
|
|
|
17b0f1 |
--- a/src/shared/missing.h
|
|
|
17b0f1 |
+++ b/src/shared/missing.h
|
|
|
17b0f1 |
@@ -35,6 +35,7 @@
|
|
|
17b0f1 |
#include <linux/loop.h>
|
|
|
17b0f1 |
#include <linux/audit.h>
|
|
|
17b0f1 |
#include <linux/capability.h>
|
|
|
17b0f1 |
+#include <linux/neighbour.h>
|
|
|
17b0f1 |
|
|
|
17b0f1 |
#ifdef HAVE_AUDIT
|
|
|
17b0f1 |
#include <libaudit.h>
|
|
|
17b0f1 |
@@ -687,6 +688,21 @@ static inline int setns(int fd, int nstype) {
|
|
|
17b0f1 |
#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
|
|
|
17b0f1 |
#endif
|
|
|
17b0f1 |
|
|
|
17b0f1 |
+#if !HAVE_DECL_NDA_IFINDEX
|
|
|
17b0f1 |
+#define NDA_UNSPEC 0
|
|
|
17b0f1 |
+#define NDA_DST 1
|
|
|
17b0f1 |
+#define NDA_LLADDR 2
|
|
|
17b0f1 |
+#define NDA_CACHEINFO 3
|
|
|
17b0f1 |
+#define NDA_PROBES 4
|
|
|
17b0f1 |
+#define NDA_VLAN 5
|
|
|
17b0f1 |
+#define NDA_PORT 6
|
|
|
17b0f1 |
+#define NDA_VNI 7
|
|
|
17b0f1 |
+#define NDA_IFINDEX 8
|
|
|
17b0f1 |
+#define __NDA_MAX 9
|
|
|
17b0f1 |
+
|
|
|
17b0f1 |
+#define NDA_MAX (__NDA_MAX - 1)
|
|
|
17b0f1 |
+#endif
|
|
|
17b0f1 |
+
|
|
|
17b0f1 |
#ifndef IPV6_UNICAST_IF
|
|
|
17b0f1 |
#define IPV6_UNICAST_IF 76
|
|
|
17b0f1 |
#endif
|