diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-10-15 03:53:15 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-15 15:26:29 -0400 |
commit | 3db05fea51cdb162cfa8f69e9cfb9e228919d2a9 (patch) | |
tree | 0d0e4c18cdf2dcb7321035f6614628a2ddfb502d /net/netfilter/nf_conntrack_core.c | |
parent | 2ca7b0ac022aa0158599178fe1056b1ba9ec8b97 (diff) |
[NETFILTER]: Replace sk_buff ** with sk_buff *
With all the users of the double pointers removed, this patch mops up by
finally replacing all occurances of sk_buff ** in the netfilter API by
sk_buff *.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/nf_conntrack_core.c')
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 83c30b45d17..4d6171bc082 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -307,7 +307,7 @@ EXPORT_SYMBOL_GPL(nf_conntrack_hash_insert); | |||
307 | 307 | ||
308 | /* Confirm a connection given skb; places it in hash table */ | 308 | /* Confirm a connection given skb; places it in hash table */ |
309 | int | 309 | int |
310 | __nf_conntrack_confirm(struct sk_buff **pskb) | 310 | __nf_conntrack_confirm(struct sk_buff *skb) |
311 | { | 311 | { |
312 | unsigned int hash, repl_hash; | 312 | unsigned int hash, repl_hash; |
313 | struct nf_conntrack_tuple_hash *h; | 313 | struct nf_conntrack_tuple_hash *h; |
@@ -316,7 +316,7 @@ __nf_conntrack_confirm(struct sk_buff **pskb) | |||
316 | struct hlist_node *n; | 316 | struct hlist_node *n; |
317 | enum ip_conntrack_info ctinfo; | 317 | enum ip_conntrack_info ctinfo; |
318 | 318 | ||
319 | ct = nf_ct_get(*pskb, &ctinfo); | 319 | ct = nf_ct_get(skb, &ctinfo); |
320 | 320 | ||
321 | /* ipt_REJECT uses nf_conntrack_attach to attach related | 321 | /* ipt_REJECT uses nf_conntrack_attach to attach related |
322 | ICMP/TCP RST packets in other direction. Actual packet | 322 | ICMP/TCP RST packets in other direction. Actual packet |
@@ -367,14 +367,14 @@ __nf_conntrack_confirm(struct sk_buff **pskb) | |||
367 | write_unlock_bh(&nf_conntrack_lock); | 367 | write_unlock_bh(&nf_conntrack_lock); |
368 | help = nfct_help(ct); | 368 | help = nfct_help(ct); |
369 | if (help && help->helper) | 369 | if (help && help->helper) |
370 | nf_conntrack_event_cache(IPCT_HELPER, *pskb); | 370 | nf_conntrack_event_cache(IPCT_HELPER, skb); |
371 | #ifdef CONFIG_NF_NAT_NEEDED | 371 | #ifdef CONFIG_NF_NAT_NEEDED |
372 | if (test_bit(IPS_SRC_NAT_DONE_BIT, &ct->status) || | 372 | if (test_bit(IPS_SRC_NAT_DONE_BIT, &ct->status) || |
373 | test_bit(IPS_DST_NAT_DONE_BIT, &ct->status)) | 373 | test_bit(IPS_DST_NAT_DONE_BIT, &ct->status)) |
374 | nf_conntrack_event_cache(IPCT_NATINFO, *pskb); | 374 | nf_conntrack_event_cache(IPCT_NATINFO, skb); |
375 | #endif | 375 | #endif |
376 | nf_conntrack_event_cache(master_ct(ct) ? | 376 | nf_conntrack_event_cache(master_ct(ct) ? |
377 | IPCT_RELATED : IPCT_NEW, *pskb); | 377 | IPCT_RELATED : IPCT_NEW, skb); |
378 | return NF_ACCEPT; | 378 | return NF_ACCEPT; |
379 | 379 | ||
380 | out: | 380 | out: |
@@ -632,7 +632,7 @@ resolve_normal_ct(struct sk_buff *skb, | |||
632 | } | 632 | } |
633 | 633 | ||
634 | unsigned int | 634 | unsigned int |
635 | nf_conntrack_in(int pf, unsigned int hooknum, struct sk_buff **pskb) | 635 | nf_conntrack_in(int pf, unsigned int hooknum, struct sk_buff *skb) |
636 | { | 636 | { |
637 | struct nf_conn *ct; | 637 | struct nf_conn *ct; |
638 | enum ip_conntrack_info ctinfo; | 638 | enum ip_conntrack_info ctinfo; |
@@ -644,14 +644,14 @@ nf_conntrack_in(int pf, unsigned int hooknum, struct sk_buff **pskb) | |||
644 | int ret; | 644 | int ret; |
645 | 645 | ||
646 | /* Previously seen (loopback or untracked)? Ignore. */ | 646 | /* Previously seen (loopback or untracked)? Ignore. */ |
647 | if ((*pskb)->nfct) { | 647 | if (skb->nfct) { |
648 | NF_CT_STAT_INC_ATOMIC(ignore); | 648 | NF_CT_STAT_INC_ATOMIC(ignore); |
649 | return NF_ACCEPT; | 649 | return NF_ACCEPT; |
650 | } | 650 | } |
651 | 651 | ||
652 | /* rcu_read_lock()ed by nf_hook_slow */ | 652 | /* rcu_read_lock()ed by nf_hook_slow */ |
653 | l3proto = __nf_ct_l3proto_find((u_int16_t)pf); | 653 | l3proto = __nf_ct_l3proto_find((u_int16_t)pf); |
654 | ret = l3proto->get_l4proto(*pskb, skb_network_offset(*pskb), | 654 | ret = l3proto->get_l4proto(skb, skb_network_offset(skb), |
655 | &dataoff, &protonum); | 655 | &dataoff, &protonum); |
656 | if (ret <= 0) { | 656 | if (ret <= 0) { |
657 | pr_debug("not prepared to track yet or error occured\n"); | 657 | pr_debug("not prepared to track yet or error occured\n"); |
@@ -666,13 +666,13 @@ nf_conntrack_in(int pf, unsigned int hooknum, struct sk_buff **pskb) | |||
666 | * inverse of the return code tells to the netfilter | 666 | * inverse of the return code tells to the netfilter |
667 | * core what to do with the packet. */ | 667 | * core what to do with the packet. */ |
668 | if (l4proto->error != NULL && | 668 | if (l4proto->error != NULL && |
669 | (ret = l4proto->error(*pskb, dataoff, &ctinfo, pf, hooknum)) <= 0) { | 669 | (ret = l4proto->error(skb, dataoff, &ctinfo, pf, hooknum)) <= 0) { |
670 | NF_CT_STAT_INC_ATOMIC(error); | 670 | NF_CT_STAT_INC_ATOMIC(error); |
671 | NF_CT_STAT_INC_ATOMIC(invalid); | 671 | NF_CT_STAT_INC_ATOMIC(invalid); |
672 | return -ret; | 672 | return -ret; |
673 | } | 673 | } |
674 | 674 | ||
675 | ct = resolve_normal_ct(*pskb, dataoff, pf, protonum, l3proto, l4proto, | 675 | ct = resolve_normal_ct(skb, dataoff, pf, protonum, l3proto, l4proto, |
676 | &set_reply, &ctinfo); | 676 | &set_reply, &ctinfo); |
677 | if (!ct) { | 677 | if (!ct) { |
678 | /* Not valid part of a connection */ | 678 | /* Not valid part of a connection */ |
@@ -686,21 +686,21 @@ nf_conntrack_in(int pf, unsigned int hooknum, struct sk_buff **pskb) | |||
686 | return NF_DROP; | 686 | return NF_DROP; |
687 | } | 687 | } |
688 | 688 | ||
689 | NF_CT_ASSERT((*pskb)->nfct); | 689 | NF_CT_ASSERT(skb->nfct); |
690 | 690 | ||
691 | ret = l4proto->packet(ct, *pskb, dataoff, ctinfo, pf, hooknum); | 691 | ret = l4proto->packet(ct, skb, dataoff, ctinfo, pf, hooknum); |
692 | if (ret < 0) { | 692 | if (ret < 0) { |
693 | /* Invalid: inverse of the return code tells | 693 | /* Invalid: inverse of the return code tells |
694 | * the netfilter core what to do */ | 694 | * the netfilter core what to do */ |
695 | pr_debug("nf_conntrack_in: Can't track with proto module\n"); | 695 | pr_debug("nf_conntrack_in: Can't track with proto module\n"); |
696 | nf_conntrack_put((*pskb)->nfct); | 696 | nf_conntrack_put(skb->nfct); |
697 | (*pskb)->nfct = NULL; | 697 | skb->nfct = NULL; |
698 | NF_CT_STAT_INC_ATOMIC(invalid); | 698 | NF_CT_STAT_INC_ATOMIC(invalid); |
699 | return -ret; | 699 | return -ret; |
700 | } | 700 | } |
701 | 701 | ||
702 | if (set_reply && !test_and_set_bit(IPS_SEEN_REPLY_BIT, &ct->status)) | 702 | if (set_reply && !test_and_set_bit(IPS_SEEN_REPLY_BIT, &ct->status)) |
703 | nf_conntrack_event_cache(IPCT_STATUS, *pskb); | 703 | nf_conntrack_event_cache(IPCT_STATUS, skb); |
704 | 704 | ||
705 | return ret; | 705 | return ret; |
706 | } | 706 | } |