diff options
author | Thilak Raj Surendra Babu <thilakraj.sb@nutanix.com> | 2022-04-26 23:59:48 -0700 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-04-27 21:38:21 +0200 |
commit | c1c8cb8a1885a51b0366e9076d6ec567484017cb (patch) | |
tree | a49c6b7c07e75112b90ce3bc2732bbcaaec98e28 /ofproto | |
parent | 2080979aed5d9e083bb133adf79f6933ada0fb98 (diff) | |
download | openvswitch-c1c8cb8a1885a51b0366e9076d6ec567484017cb.tar.gz |
ofproto-dpif-xlate: Clear out vlan flow fields while processing native tunnel.
When a packet is received over an access port that needs to be sent
over a vxlan tunnel,the access port VLAN id is used in the lookup
leading to a wrong packet being crafted and sent over the tunnel.
Clear out the flow 's VLAN field as it should not be used while
performing mac lookup for the outer tunnel and also at this point
the VLAN action related to inner flow is already committed.
Fixes: 7c12dfc527a5 ("tunneling: Avoid datapath-recirc by combining recirc actions at xlate.")
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2022-April/393566.html
Reported-at: https://bugzilla.redhat.com/2060552
Signed-off-by: Thilak Raj Surendra Babu <thilakraj.sb@nutanix.com>
Signed-off-by: Rosemarie O'Riorden <roriorden@redhat.com>
Co-authored-by: Rosemarie O'Riorden <roriorden@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r-- | ofproto/ofproto-dpif-xlate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index d085c5ba5..17f7e2883 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -3542,6 +3542,9 @@ propagate_tunnel_data_to_flow__(struct flow *dst_flow, dst_flow->dl_dst = dmac; dst_flow->dl_src = smac; + /* Clear VLAN entries which do not apply for tunnel flows. */ + memset(dst_flow->vlans, 0, sizeof dst_flow->vlans); + 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; |