openvswitch: take into account de-fragmentation/gso_size in execute_check_pkt_len
authorLorenzo Bianconi <lorenzo@kernel.org>
Tue, 23 Jun 2020 16:33:15 +0000 (18:33 +0200)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:36:45 +0000 (15:36 -0400)
commita908f986ddf7d989fda232c5e7cecbf9f6e5165b
tree7e46025b1821de8907c8c66fbba21f88afb58e45
parent27b70214fc6995087c76a24cc3ff2742a23aff5d
openvswitch: take into account de-fragmentation/gso_size in execute_check_pkt_len

[ Upstream commit 17843655708e1941c0653af3cd61be6948e36f43 ]

ovs connection tracking module performs de-fragmentation on incoming
fragmented traffic. Take info account if traffic has been de-fragmented
in execute_check_pkt_len action otherwise we will perform the wrong
nested action considering the original packet size. This issue typically
occurs if ovs-vswitchd adds a rule in the pipeline that requires connection
tracking (e.g. OVN stateful ACLs) before execute_check_pkt_len action.
Moreover take into account GSO fragment size for GSO packet in
execute_check_pkt_len routine

Fixes: 4d5ec89fc8d14 ("net: openvswitch: Add a new action check_pkt_len")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/openvswitch/actions.c