Skip to content

Commit

Permalink
vxlan: Only set has-GBP bit in header if any other bits would be set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Graf authored and David S. Miller committed Feb 5, 2015
1 parent 7af348b commit db79a62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit db79a62

Please sign in to comment.