netfilter: nf_conntrack_tcp: skip tracking for offloaded packets
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 1/1 netfilter: nf_conntrack_tcp: skip tracking for offloaded packets
Sometimes flowtable datapath passes up packets to classic forwarding path, eg. mtu exceeded case. Skip TCP tracking otherwise these packets are considered invalid by conntrack.
Fixes ac2a66665e23 ("netfilter: add generic flow table infrastructure")
Signed-off-by Pablo Neira Ayuso <[email protected]>
---
This is a fix, but I'm routing it through nf-next at this stage.
net/netfilter/nf_conntrack_proto_tcp.c | 3 +++ 1 file changed, 3 insertions(+)
net/netfilter/nf_conntrack_proto_tcp.c +3 -0
@@ -889,6 +889,9 @@ int nf_conntrack_tcp_packet(struct nf_conn *ct,if (!nf_ct_is_confirmed (ct) && !tcp_new (ct, skb, dataoff, th))return -NF_ACCEPT ; +if (unlikely (test_bit (IPS_OFFLOAD_BIT , &ct->status))) +return NF_ACCEPT ; +spin_lock_bh (&ct->lock); old_state = ct->proto.tcp.state; dir =CTINFO2DIR (ctinfo);
Signature · 1 line
2.30.2
Florian Westphal
maintainerQuoted 3 lines · Pablo Neira Ayuso
Sometimes flowtable datapath passes up packets to classic forwarding path, eg. mtu exceeded case. Skip TCP tracking otherwise these packets are considered invalid by conntrack.
They are? nft_flow_offload_eval() sets IP_CT_TCP_FLAG_BE_LIBERAL for the conntrack, so at least window checks are disabled.