Skip to content

Commit

Permalink
openvswitch: Only set TUNNEL_VXLAN_OPT if VXLAN-GBP metadata is set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Graf authored and David S. Miller committed Feb 9, 2015
1 parent 60cd085 commit fd3137c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/openvswitch/vport-vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit fd3137c

Please sign in to comment.