Centos-kernel-stream-9/net/openvswitch
Antoine Tenart f6b6b3d9c9 net: openvswitch: Fix ct_state nat flags for conns arriving from tc
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2045048
Upstream Status: linux.git
Tested: Sanity only

commit 6f022c2ddbcefaee79502ce5386dfe351d457070
Author: Paul Blakey <paulb@nvidia.com>
Date:   Thu Jan 6 17:38:04 2022 +0200

    net: openvswitch: Fix ct_state nat flags for conns arriving from tc

    Netfilter conntrack maintains NAT flags per connection indicating
    whether NAT was configured for the connection. Openvswitch maintains
    NAT flags on the per packet flow key ct_state field, indicating
    whether NAT was actually executed on the packet.

    When a packet misses from tc to ovs the conntrack NAT flags are set.
    However, NAT was not necessarily executed on the packet because the
    connection's state might still be in NEW state. As such, openvswitch
    wrongly assumes that NAT was executed and sets an incorrect flow key
    NAT flags.

    Fix this, by flagging to openvswitch which NAT was actually done in
    act_ct via tc_skb_ext and tc_skb_cb to the openvswitch module, so
    the packet flow key NAT flags will be correctly set.

    Fixes: b57dc7c13e ("net/sched: Introduce action ct")
    Signed-off-by: Paul Blakey <paulb@nvidia.com>
    Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
    Link: https://lore.kernel.org/r/20220106153804.26451-1-paulb@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Antoine Tenart <atenart@redhat.com>
2022-01-26 16:54:01 +01:00
..
Kconfig
Makefile openvswitch: add trace points 2021-06-22 10:47:32 -07:00
actions.c openvswitch: fix alignment issues 2022-01-26 16:54:00 +01:00
conntrack.c net: openvswitch: Remove unnecessary skb_nfct() 2021-05-10 14:18:19 -07:00
conntrack.h net/sched: act_api: fix miss set post_ct for ovs after do conntrack in act_ct 2021-03-16 15:22:18 -07:00
datapath.c openvswitch: fix sparse warning incorrect type 2022-01-26 16:54:01 +01:00
datapath.h openvswitch: Introduce per-cpu upcall dispatch 2022-01-26 16:54:00 +01:00
dp_notify.c
flow.c net: openvswitch: Fix ct_state nat flags for conns arriving from tc 2022-01-26 16:54:01 +01:00
flow.h
flow_netlink.c net: openvswitch: add log message for error case 2021-01-14 16:32:14 -08:00
flow_netlink.h
flow_table.c openvswitch: Optimize operation for key comparison 2021-07-01 11:13:10 -07:00
flow_table.h
meter.c openvswitch: meter: fix race when getting now_ms. 2021-05-13 15:54:59 -07:00
meter.h
openvswitch_trace.c openvswitch: add trace points 2021-06-22 10:47:32 -07:00
openvswitch_trace.h openvswitch: add trace points 2021-06-22 10:47:32 -07:00
vport-geneve.c
vport-gre.c
vport-internal_dev.c net: openvswitch: use core API to update/provide stats 2020-11-14 16:59:32 -08:00
vport-internal_dev.h
vport-netdev.c net: openvswitch: Use 'skb_push_rcsum()' instead of hand coding it 2021-04-04 01:43:02 -07:00
vport-netdev.h
vport-vxlan.c
vport.c ovs: clear skb->tstamp in forwarding path 2021-08-18 11:31:13 +01:00
vport.h openvswitch: Fix a typo 2021-03-22 12:59:46 -07:00