Upstream commit:
commit
dc5321d79697db1b610c25fa4fad1aec7533ea3e
Author: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon Jun 19 10:03:56 2017 +0200
vxlan: get rid of redundant vxlan_dev.flags
There is no good reason to keep the flags twice in vxlan_dev and
vxlan_config.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Applied using HAVE_VXLAN_DEV_CFG compatibility flag defined in
acinclude.m4.
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netdevice.h], [net_device],
[needs_free_netdev],
[OVS_DEFINE([HAVE_NEEDS_FREE_NETDEV])])
+ OVS_FIND_FIELD_IFELSE([$KSRC/include/net/vxlan.h], [vxlan_dev], [cfg],
+ [OVS_DEFINE([HAVE_VXLAN_DEV_CFG])])
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_helper.h],
[nf_conntrack_helper_put])
if (nla_put_u16(skb, OVS_TUNNEL_ATTR_DST_PORT, ntohs(dst_port)))
return -EMSGSIZE;
+#ifdef HAVE_VXLAN_DEV_CFG
+ if (vxlan->cfg.flags & VXLAN_F_GBP) {
+#else
if (vxlan->flags & VXLAN_F_GBP) {
+#endif
struct nlattr *exts;
exts = nla_nest_start(skb, OVS_TUNNEL_ATTR_EXTENSION);
if (!exts)
return -EMSGSIZE;
+#ifdef HAVE_VXLAN_DEV_CFG
+ if (vxlan->cfg.flags & VXLAN_F_GBP &&
+#else
if (vxlan->flags & VXLAN_F_GBP &&
+#endif
nla_put_flag(skb, OVS_VXLAN_EXT_GBP))
return -EMSGSIZE;