From: Thomas Graf Date: Wed, 4 Feb 2015 16:00:04 +0000 (+0100) Subject: vxlan: Only set has-GBP bit in header if any other bits would be set X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=db79a621835ee91d3e10177abd97f48e0a4dcf9b;p=openwrt%2Fstaging%2Fblogic.git vxlan: Only set has-GBP bit in header if any other bits would be set This allows for a VXLAN-GBP socket to talk to a Linux VXLAN socket by not setting any of the bits. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index c184717e8b28..d08072c10aa9 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -1667,6 +1667,9 @@ static void vxlan_build_gbp_hdr(struct vxlanhdr *vxh, u32 vxflags, { struct vxlanhdr_gbp *gbp; + if (!md->gbp) + return; + gbp = (struct vxlanhdr_gbp *)vxh; vxh->vx_flags |= htonl(VXLAN_HF_GBP);