From 52d8f0d84f47e090b30544468953ab9060430322 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 30 Nov 2016 20:24:47 -0500 Subject: [PATCH] zebra: Cleanup compile for older linux platforms. Allow code to compile for older platforms. Ticket: CM-13745 Signed-off-by: Donald Sharp --- zebra/if_netlink.c | 42 ++++++++++++++++++++++++++++++++++++++++++ zebra/rt_netlink.c | 6 ++++++ 2 files changed, 48 insertions(+) diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index 180e8c5de6..1748703a3e 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -173,6 +173,48 @@ netlink_to_zebra_link_type (unsigned int hwt) } } + +//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)) diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 15dd7ef1cb..05a9940a93 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -86,6 +86,10 @@ #ifndef MPLS_IPTUNNEL_DST #define MPLS_IPTUNNEL_DST 1 #endif + +#ifndef NDA_MASTER +#define NDA_MASTER 9 +#endif /* End of temporary definitions */ struct gw_family_t @@ -562,8 +566,10 @@ netlink_route_change_read_multicast (struct sockaddr_nl *snl, struct nlmsghdr *h if (tb[RTA_DST]) m->sg.grp = *(struct in_addr *)RTA_DATA (tb[RTA_DST]); +#if defined RTA_EXPIRES if (tb[RTA_EXPIRES]) m->lastused = *(unsigned long long *)RTA_DATA (tb[RTA_EXPIRES]); +#endif if (tb[RTA_MULTIPATH]) { -- 2.39.5