Skip to content

Commit 2f131de

Browse files
Paul Blakeydavem330
authored andcommitted
net/sched: act_ct: Fix flow table lookup after ct clear or switching zones
Flow table lookup is skipped if packet either went through ct clear action (which set the IP_CT_UNTRACKED flag on the packet), or while switching zones and there is already a connection associated with the packet. This will result in no SW offload of the connection, and the and connection not being removed from flow table with TCP teardown (fin/rst packet). To fix the above, remove these unneccary checks in flow table lookup. Fixes: 46475bb ("net/sched: act_ct: Software offload of established flows") Signed-off-by: Paul Blakey <[email protected]> Acked-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4224cfd commit 2f131de

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

net/sched/act_ct.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,6 @@ static bool tcf_ct_flow_table_lookup(struct tcf_ct_params *p,
533533
struct nf_conn *ct;
534534
u8 dir;
535535

536-
/* Previously seen or loopback */
537-
ct = nf_ct_get(skb, &ctinfo);
538-
if ((ct && !nf_ct_is_template(ct)) || ctinfo == IP_CT_UNTRACKED)
539-
return false;
540-
541536
switch (family) {
542537
case NFPROTO_IPV4:
543538
if (!tcf_ct_flow_table_fill_tuple_ipv4(skb, &tuple, &tcph))

0 commit comments

Comments
 (0)