]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: Properly set L4 keys on "later" IP fragments
authorGreg Rose <gvrose8192@gmail.com>
Tue, 27 Aug 2019 14:58:09 +0000 (07:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Aug 2019 21:53:51 +0000 (14:53 -0700)
commitc4001558f5976b5439115704bec6357d9d810f83
treec51c3fae651607226cc0dd2feb462008846340d7
parent122917cf448bd3e0985c97976022db0503f6b3cb
openvswitch: Properly set L4 keys on "later" IP fragments

When IP fragments are reassembled before being sent to conntrack, the
key from the last fragment is used.  Unless there are reordering
issues, the last fragment received will not contain the L4 ports, so the
key for the reassembled datagram won't contain them.  This patch updates
the key once we have a reassembled datagram.

The handle_fragments() function works on L3 headers so we pull the L3/L4
flow key update code from key_extract into a new function
'key_extract_l3l4'.  Then we add a another new function
ovs_flow_key_update_l3l4() and export it so that it is accessible by
handle_fragments() for conntrack packet reassembly.

Co-authored-by: Justin Pettit <jpettit@ovn.org>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/conntrack.c
net/openvswitch/flow.c
net/openvswitch/flow.h