diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-09-20 22:12:56 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-10-24 09:20:12 -0200 |
| commit | ba7773964c87019308e65a15b509e9889f7edc49 (patch) | |
| tree | 866360d3a33d6d15266314e9c8778a278a6a400a /zebra/if_netlink.c | |
| parent | 72806e2d23228892993eacdf9415f29eadb52f55 (diff) | |
build: include our own copies of some linux kernel headers
This is the definitive solution to avoid build issues on old Linux
systems, where the system kernel headers might not contain some constants
or macros used by FRR (e.g. MPLS_IPTUNNEL_DST, introduced on 2015).
This is the same strategy adopted by other projects, like iproute2,
libnl, lldpd, strongswan, etc. These header files don't need to be in
sync with upstream, they only need to be updated when necessary (e.g. if
we want to use a new feature introduced by a recent kernel).
Fixes #962 using the solution suggested by David Lamparter.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/if_netlink.c')
| -rw-r--r-- | zebra/if_netlink.c | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index a2235904c6..cf8bdf5a8e 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -31,6 +31,7 @@ #define _LINUX_IN6_H #include <linux/if_bridge.h> +#include <linux/if_link.h> #include <net/if_arp.h> #include <linux/sockios.h> #include <linux/ethtool.h> @@ -255,47 +256,6 @@ static void netlink_determine_zebra_iftype(char *kind, zebra_iftype_t *zif_type) *zif_type = ZEBRA_IF_MACVLAN; } -// Temporary Assignments to compile on older platforms. -#ifndef IFLA_BR_MAX -#define IFLA_BR_MAX 39 -#endif - -#ifndef IFLA_VXLAN_ID -#define IFLA_VXLAN_ID 1 -#endif - -#ifndef IFLA_VXLAN_LOCAL -#define IFLA_VXLAN_LOCAL 4 -#endif - -#ifndef IFLA_VXLAN_MAX -#define IFLA_VXLAN_MAX 26 -#endif - -#ifndef IFLA_BRIDGE_MAX -#define IFLA_BRIDGE_MAX 2 -#endif - -#ifndef IFLA_BRIDGE_VLAN_INFO -#define IFLA_BRIDGE_VLAN_INFO 2 -#endif - -#ifndef BRIDGE_VLAN_INFO_PVID -#define BRIDGE_VLAN_INFO_PVID (1<<1) -#endif - -#ifndef RTEXT_FILTER_BRVLAN -#define RTEXT_FILTER_BRVLAN (1<<1) -#endif - -#ifndef NTF_SELF -#define NTF_SELF 0x02 -#endif - -#ifndef IFLA_BR_VLAN_FILTERING -#define IFLA_BR_VLAN_FILTERING 7 -#endif - #define parse_rtattr_nested(tb, max, rta) \ netlink_parse_rtattr((tb), (max), RTA_DATA(rta), RTA_PAYLOAD(rta)) |
