summaryrefslogtreecommitdiffstats
path: root/net/openvswitch
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2015-02-09 16:56:37 +0100
committerDavid S. Miller <davem@davemloft.net>2015-02-09 14:25:52 -0800
commitfd3137cd33ae5590c45c81e9a46fe53b6ab5f66e (patch)
tree2625c5401a659d30f3c9c65da9674a8430212d7b /net/openvswitch
parent60cd0854de687103125e2aa62b5f6ab3ee0213ea (diff)
downloadlinux-fd3137cd33ae5590c45c81e9a46fe53b6ab5f66e.tar.gz
linux-fd3137cd33ae5590c45c81e9a46fe53b6ab5f66e.tar.bz2
linux-fd3137cd33ae5590c45c81e9a46fe53b6ab5f66e.zip
openvswitch: Only set TUNNEL_VXLAN_OPT if VXLAN-GBP metadata is set
This avoids setting TUNNEL_VXLAN_OPT for VXLAN frames which don't have any GBP metadata set. It is not invalid to set it but unnecessary. Signed-off-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch')
-rw-r--r--net/openvswitch/vport-vxlan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c
index ff07d4062d60..3277a7520e31 100644
--- a/net/openvswitch/vport-vxlan.c
+++ b/net/openvswitch/vport-vxlan.c
@@ -76,7 +76,7 @@ static void vxlan_rcv(struct vxlan_sock *vs, struct sk_buff *skb,
flags = TUNNEL_KEY | (udp_hdr(skb)->check != 0 ? TUNNEL_CSUM : 0);
vxlan_port = vxlan_vport(vport);
- if (vxlan_port->exts & VXLAN_F_GBP)
+ if (vxlan_port->exts & VXLAN_F_GBP && md->gbp)
flags |= TUNNEL_VXLAN_OPT;
/* Save outer tunnel values */