aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/conntrack.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-01-23 12:21:57 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2017-02-02 08:31:54 -0500
commitc74454fadd5ea6fc866ffe2c417a0dba56b2bf1c (patch)
tree7e2ab906478778bc0733840c6e5cc46bfceeda4c /net/openvswitch/conntrack.c
parentcb9c68363efb6d1f950ec55fb06e031ee70db5fc (diff)
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/openvswitch/conntrack.c')
-rw-r--r--net/openvswitch/conntrack.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 452557946147..d1fbfcaa009a 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -460,8 +460,7 @@ ovs_ct_find_existing(struct net *net, const struct nf_conntrack_zone *zone,
460 460
461 ct = nf_ct_tuplehash_to_ctrack(h); 461 ct = nf_ct_tuplehash_to_ctrack(h);
462 462
463 skb->nfct = &ct->ct_general; 463 nf_ct_set(skb, ct, ovs_ct_get_info(h));
464 skb->nfctinfo = ovs_ct_get_info(h);
465 return ct; 464 return ct;
466} 465}
467 466
@@ -724,8 +723,7 @@ static int __ovs_ct_lookup(struct net *net, struct sw_flow_key *key,
724 if (skb_nfct(skb)) 723 if (skb_nfct(skb))
725 nf_conntrack_put(skb_nfct(skb)); 724 nf_conntrack_put(skb_nfct(skb));
726 nf_conntrack_get(&tmpl->ct_general); 725 nf_conntrack_get(&tmpl->ct_general);
727 skb->nfct = &tmpl->ct_general; 726 nf_ct_set(skb, tmpl, IP_CT_NEW);
728 skb->nfctinfo = IP_CT_NEW;
729 } 727 }
730 728
731 err = nf_conntrack_in(net, info->family, 729 err = nf_conntrack_in(net, info->family,