netfilter: nf_flow_table: remove unnecessary parameter in flow_offload_fill_dir
authorwenxu <wenxu@ucloud.cn>
Wed, 13 Nov 2019 04:46:40 +0000 (12:46 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 15 Nov 2019 22:44:50 +0000 (23:44 +0100)
The ct object is already in the flow_offload structure, remove it.

Signed-off-by: wenxu <wenxu@ucloud.cn>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_flow_table_core.c

index 8468d2d02284f56ef5b641496615ac08b4090695..9889d52eda8203a5e247ef2e5d2c477f05721e6d 100644 (file)
@@ -18,11 +18,11 @@ static DEFINE_MUTEX(flowtable_lock);
 static LIST_HEAD(flowtables);
 
 static void
-flow_offload_fill_dir(struct flow_offload *flow, struct nf_conn *ct,
+flow_offload_fill_dir(struct flow_offload *flow,
                      enum flow_offload_tuple_dir dir)
 {
        struct flow_offload_tuple *ft = &flow->tuplehash[dir].tuple;
-       struct nf_conntrack_tuple *ctt = &ct->tuplehash[dir].tuple;
+       struct nf_conntrack_tuple *ctt = &flow->ct->tuplehash[dir].tuple;
 
        ft->dir = dir;
 
@@ -57,8 +57,8 @@ struct flow_offload *flow_offload_alloc(struct nf_conn *ct)
 
        flow->ct = ct;
 
-       flow_offload_fill_dir(flow, ct, FLOW_OFFLOAD_DIR_ORIGINAL);
-       flow_offload_fill_dir(flow, ct, FLOW_OFFLOAD_DIR_REPLY);
+       flow_offload_fill_dir(flow, FLOW_OFFLOAD_DIR_ORIGINAL);
+       flow_offload_fill_dir(flow, FLOW_OFFLOAD_DIR_REPLY);
 
        if (ct->status & IPS_SRC_NAT)
                flow->flags |= FLOW_OFFLOAD_SNAT;