aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/nf_dup_ipv4.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-01-23 18:21:57 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2017-02-02 14:31:54 +0100
commitc74454fadd5ea6fc866ffe2c417a0dba56b2bf1c (patch)
tree7e2ab906478778bc0733840c6e5cc46bfceeda4c /net/ipv4/netfilter/nf_dup_ipv4.c
parentcb9c68363efb6d1f950ec55fb06e031ee70db5fc (diff)
downloadlinux-c74454fadd5ea6fc866ffe2c417a0dba56b2bf1c.tar.gz
netfilter: add and use nf_ct_set helper
Add a helper to assign a nf_conn entry and the ctinfo bits to an sk_buff. This avoids changing code in followup patch that merges skb->nfct and skb->nfctinfo into skb->_nfct. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv4/netfilter/nf_dup_ipv4.c')
-rw-r--r--net/ipv4/netfilter/nf_dup_ipv4.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/nf_dup_ipv4.c b/net/ipv4/netfilter/nf_dup_ipv4.c
index 1a5e1f53ceaa91..f0dbff05fc2817 100644
--- a/net/ipv4/netfilter/nf_dup_ipv4.c
+++ b/net/ipv4/netfilter/nf_dup_ipv4.c
@@ -69,8 +69,7 @@ void nf_dup_ipv4(struct net *net, struct sk_buff *skb, unsigned int hooknum,
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
/* Avoid counting cloned packets towards the original connection. */
nf_reset(skb);
- skb->nfct = &nf_ct_untracked_get()->ct_general;
- skb->nfctinfo = IP_CT_NEW;
+ nf_ct_set(skb, nf_ct_untracked_get(), IP_CT_NEW);
nf_conntrack_get(skb_nfct(skb));
#endif
/*