vxlan: Set FLOW_TNL_F_KEY for received packets.
authorJesse Gross <jesse@nicira.com>
Tue, 7 Apr 2015 23:40:18 +0000 (16:40 -0700)
committerJesse Gross <jesse@nicira.com>
Tue, 7 Apr 2015 23:45:03 +0000 (16:45 -0700)
The VNI is always present in the VXLAN header, so we should
set the FLOW_TNL_F_KEY flag to indicate this. However, the
userspace implementation of VXLAN currently does not.

Signed-off-by: Jesse Gross <jesse@nicira.com>
lib/netdev-vport.c

index 0e0d791..c207cea 100644 (file)
@@ -1093,6 +1093,7 @@ vxlan_extract_md(struct dp_packet *packet)
     tnl->tp_src = udp->udp_src;
     tnl->tp_dst = udp->udp_dst;
     tnl->tun_id = htonll(ntohl(get_16aligned_be32(&vxh->vx_vni)) >> 8);
+    tnl->flags |= FLOW_TNL_F_KEY;
 
     dp_packet_reset_packet(packet, VXLAN_HLEN);
 }