Fix for VLAN transparency issue with VLAN tagged VxLAN VTEPs.

Issue:
OVS VLAN transparency is broken, when a VxLAN VTEP is also
configured with a VLAN.
This causes, any VLAN traffic originating from a VM to be dropped
with error "disallowed VLAN VID for this input port, dropping"
While propagating tunnel data to flow during build_tunnel_send,
L2, L3 and L4 data is propagated but vlan data is not cleared.
Flow vlan data is still pointing to inner packet vlan header content
and causing the issue.

Solution:
Cleared vlan data from the flow during tunnel data propagation.
---
 ofproto/ofproto-dpif-xlate.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index e0ede2c..440ed86 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -3518,9 +3518,15 @@ propagate_tunnel_data_to_flow__(struct flow *dst_flow,
                                 struct in6_addr s_ip6, ovs_be32 s_ip,
                                 bool is_tnl_ipv6, uint8_t nw_proto)
 {
+    int n = flow_count_vlan_headers(dst_flow);
     dst_flow->dl_dst = dmac;
     dst_flow->dl_src = smac;
 
+    /* Clearing the inner packet vlan data from flow */
+    for (int i = 0; i < n; i++) {
+        flow_pop_vlan(dst_flow, NULL);
+    }
+
     dst_flow->packet_type = htonl(PT_ETH);
     dst_flow->nw_dst = src_flow->tunnel.ip_dst;
     dst_flow->nw_src = src_flow->tunnel.ip_src;
-- 
2.7.4

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to