浏览代码

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 <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Thomas Graf 10 年之前
父节点
当前提交
db79a62183
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/net/vxlan.c

+ 3 - 0
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);