Skip to content

Commit beb97d3

Browse files
wenxudavem330
authored andcommitted
net/sched: act_ct: update nf_conn_acct for act_ct SW offload in flowtable
When the act_ct SW offload in flowtable, The counter of the conntrack entry will never update. So update the nf_conn_acct conuter in act_ct flowtable software offload. Signed-off-by: wenxu <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 58989d7 commit beb97d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/sched/act_ct.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <net/netfilter/nf_conntrack_core.h>
3131
#include <net/netfilter/nf_conntrack_zones.h>
3232
#include <net/netfilter/nf_conntrack_helper.h>
33+
#include <net/netfilter/nf_conntrack_acct.h>
3334
#include <net/netfilter/ipv6/nf_defrag_ipv6.h>
3435
#include <uapi/linux/netfilter/nf_nat.h>
3536

@@ -536,6 +537,7 @@ static bool tcf_ct_flow_table_lookup(struct tcf_ct_params *p,
536537
flow_offload_refresh(nf_ft, flow);
537538
nf_conntrack_get(&ct->ct_general);
538539
nf_ct_set(skb, ct, ctinfo);
540+
nf_ct_acct_update(ct, dir, skb->len);
539541

540542
return true;
541543
}

0 commit comments

Comments
 (0)