diff options
author | wenxu <wenxu@ucloud.cn> | 2020-04-21 07:55:43 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-22 12:48:17 -0700 |
commit | beb97d3a3192c00575580af9073921c6283cf93d (patch) | |
tree | af2e0c57be92a214f1ca2d9081a0c159e72ed08d /net/sched/act_ct.c | |
parent | 58989d7cf6eefc7bc63b63739523e9319a8cfd81 (diff) | |
download | lwn-beb97d3a3192c00575580af9073921c6283cf93d.tar.gz lwn-beb97d3a3192c00575580af9073921c6283cf93d.zip |
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 <wenxu@ucloud.cn>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_ct.c')
-rw-r--r-- | net/sched/act_ct.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c index 1a766393be62..9adff83b523b 100644 --- a/net/sched/act_ct.c +++ b/net/sched/act_ct.c @@ -30,6 +30,7 @@ #include <net/netfilter/nf_conntrack_core.h> #include <net/netfilter/nf_conntrack_zones.h> #include <net/netfilter/nf_conntrack_helper.h> +#include <net/netfilter/nf_conntrack_acct.h> #include <net/netfilter/ipv6/nf_defrag_ipv6.h> #include <uapi/linux/netfilter/nf_nat.h> @@ -536,6 +537,7 @@ static bool tcf_ct_flow_table_lookup(struct tcf_ct_params *p, flow_offload_refresh(nf_ft, flow); nf_conntrack_get(&ct->ct_general); nf_ct_set(skb, ct, ctinfo); + nf_ct_acct_update(ct, dir, skb->len); return true; } |