]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
vxlan: Only set has-GBP bit in header if any other bits would be set
authorThomas Graf <tgraf@suug.ch>
Wed, 4 Feb 2015 16:00:04 +0000 (17:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Feb 2015 08:38:02 +0000 (00:38 -0800)
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 <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c

index c184717e8b283b3d4ae5c57ef5290c2d311ce215..d08072c10aa919bc2a34617908daf28f0539576a 100644 (file)
@@ -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);