zebra: Cleanup compile for older linux platforms.

Allow code to compile for older platforms.

Ticket: CM-13745
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-11-30 20:24:47 -05:00
parent c024cfacea
commit 52d8f0d84f
2 changed files with 48 additions and 0 deletions

View File

@ -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))

View File

@ -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])
{