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 | |
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')
-rw-r--r-- | net/netfilter/core.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_amanda.c | 20 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 30 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_ftp.c | 18 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_h323_main.c | 236 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_irc.c | 16 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netbios_ns.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_pptp.c | 28 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_sane.c | 10 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_sip.c | 24 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_tftp.c | 8 | ||||
-rw-r--r-- | net/netfilter/nf_internals.h | 2 | ||||
-rw-r--r-- | net/netfilter/nf_queue.c | 4 | ||||
-rw-r--r-- | net/netfilter/xt_CLASSIFY.c | 4 | ||||
-rw-r--r-- | net/netfilter/xt_CONNMARK.c | 14 | ||||
-rw-r--r-- | net/netfilter/xt_CONNSECMARK.c | 3 | ||||
-rw-r--r-- | net/netfilter/xt_DSCP.c | 16 | ||||
-rw-r--r-- | net/netfilter/xt_MARK.c | 12 | ||||
-rw-r--r-- | net/netfilter/xt_NFLOG.c | 4 | ||||
-rw-r--r-- | net/netfilter/xt_NFQUEUE.c | 2 | ||||
-rw-r--r-- | net/netfilter/xt_NOTRACK.c | 10 | ||||
-rw-r--r-- | net/netfilter/xt_SECMARK.c | 4 | ||||
-rw-r--r-- | net/netfilter/xt_TCPMSS.c | 52 | ||||
-rw-r--r-- | net/netfilter/xt_TRACE.c | 4 |
24 files changed, 270 insertions, 271 deletions
diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 2c9e8e3652d0..bed9ba01e8ec 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c | |||
@@ -117,7 +117,7 @@ void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n) | |||
117 | EXPORT_SYMBOL(nf_unregister_hooks); | 117 | EXPORT_SYMBOL(nf_unregister_hooks); |
118 | 118 | ||
119 | unsigned int nf_iterate(struct list_head *head, | 119 | unsigned int nf_iterate(struct list_head *head, |
120 | struct sk_buff **skb, | 120 | struct sk_buff *skb, |
121 | int hook, | 121 | int hook, |
122 | const struct net_device *indev, | 122 | const struct net_device *indev, |
123 | const struct net_device *outdev, | 123 | const struct net_device *outdev, |
@@ -160,7 +160,7 @@ unsigned int nf_iterate(struct list_head *head, | |||
160 | 160 | ||
161 | /* Returns 1 if okfn() needs to be executed by the caller, | 161 | /* Returns 1 if okfn() needs to be executed by the caller, |
162 | * -EPERM for NF_DROP, 0 otherwise. */ | 162 | * -EPERM for NF_DROP, 0 otherwise. */ |
163 | int nf_hook_slow(int pf, unsigned int hook, struct sk_buff **pskb, | 163 | int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb, |
164 | struct net_device *indev, | 164 | struct net_device *indev, |
165 | struct net_device *outdev, | 165 | struct net_device *outdev, |
166 | int (*okfn)(struct sk_buff *), | 166 | int (*okfn)(struct sk_buff *), |
@@ -175,17 +175,17 @@ int nf_hook_slow(int pf, unsigned int hook, struct sk_buff **pskb, | |||
175 | 175 | ||
176 | elem = &nf_hooks[pf][hook]; | 176 | elem = &nf_hooks[pf][hook]; |
177 | next_hook: | 177 | next_hook: |
178 | verdict = nf_iterate(&nf_hooks[pf][hook], pskb, hook, indev, | 178 | verdict = nf_iterate(&nf_hooks[pf][hook], skb, hook, indev, |
179 | outdev, &elem, okfn, hook_thresh); | 179 | outdev, &elem, okfn, hook_thresh); |
180 | if (verdict == NF_ACCEPT || verdict == NF_STOP) { | 180 | if (verdict == NF_ACCEPT || verdict == NF_STOP) { |
181 | ret = 1; | 181 | ret = 1; |
182 | goto unlock; | 182 | goto unlock; |
183 | } else if (verdict == NF_DROP) { | 183 | } else if (verdict == NF_DROP) { |
184 | kfree_skb(*pskb); | 184 | kfree_skb(skb); |
185 | ret = -EPERM; | 185 | ret = -EPERM; |
186 | } else if ((verdict & NF_VERDICT_MASK) == NF_QUEUE) { | 186 | } else if ((verdict & NF_VERDICT_MASK) == NF_QUEUE) { |
187 | NFDEBUG("nf_hook: Verdict = QUEUE.\n"); | 187 | NFDEBUG("nf_hook: Verdict = QUEUE.\n"); |
188 | if (!nf_queue(*pskb, elem, pf, hook, indev, outdev, okfn, | 188 | if (!nf_queue(skb, elem, pf, hook, indev, outdev, okfn, |
189 | verdict >> NF_VERDICT_BITS)) | 189 | verdict >> NF_VERDICT_BITS)) |
190 | goto next_hook; | 190 | goto next_hook; |
191 | } | 191 | } |
diff --git a/net/netfilter/nf_conntrack_amanda.c b/net/netfilter/nf_conntrack_amanda.c index e42ab230ad88..7b8239c0cd5e 100644 --- a/net/netfilter/nf_conntrack_amanda.c +++ b/net/netfilter/nf_conntrack_amanda.c | |||
@@ -36,7 +36,7 @@ MODULE_PARM_DESC(master_timeout, "timeout for the master connection"); | |||
36 | module_param(ts_algo, charp, 0400); | 36 | module_param(ts_algo, charp, 0400); |
37 | MODULE_PARM_DESC(ts_algo, "textsearch algorithm to use (default kmp)"); | 37 | MODULE_PARM_DESC(ts_algo, "textsearch algorithm to use (default kmp)"); |
38 | 38 | ||
39 | unsigned int (*nf_nat_amanda_hook)(struct sk_buff **pskb, | 39 | unsigned int (*nf_nat_amanda_hook)(struct sk_buff *skb, |
40 | enum ip_conntrack_info ctinfo, | 40 | enum ip_conntrack_info ctinfo, |
41 | unsigned int matchoff, | 41 | unsigned int matchoff, |
42 | unsigned int matchlen, | 42 | unsigned int matchlen, |
@@ -79,7 +79,7 @@ static struct { | |||
79 | }, | 79 | }, |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static int amanda_help(struct sk_buff **pskb, | 82 | static int amanda_help(struct sk_buff *skb, |
83 | unsigned int protoff, | 83 | unsigned int protoff, |
84 | struct nf_conn *ct, | 84 | struct nf_conn *ct, |
85 | enum ip_conntrack_info ctinfo) | 85 | enum ip_conntrack_info ctinfo) |
@@ -101,25 +101,25 @@ static int amanda_help(struct sk_buff **pskb, | |||
101 | 101 | ||
102 | /* increase the UDP timeout of the master connection as replies from | 102 | /* increase the UDP timeout of the master connection as replies from |
103 | * Amanda clients to the server can be quite delayed */ | 103 | * Amanda clients to the server can be quite delayed */ |
104 | nf_ct_refresh(ct, *pskb, master_timeout * HZ); | 104 | nf_ct_refresh(ct, skb, master_timeout * HZ); |
105 | 105 | ||
106 | /* No data? */ | 106 | /* No data? */ |
107 | dataoff = protoff + sizeof(struct udphdr); | 107 | dataoff = protoff + sizeof(struct udphdr); |
108 | if (dataoff >= (*pskb)->len) { | 108 | if (dataoff >= skb->len) { |
109 | if (net_ratelimit()) | 109 | if (net_ratelimit()) |
110 | printk("amanda_help: skblen = %u\n", (*pskb)->len); | 110 | printk("amanda_help: skblen = %u\n", skb->len); |
111 | return NF_ACCEPT; | 111 | return NF_ACCEPT; |
112 | } | 112 | } |
113 | 113 | ||
114 | memset(&ts, 0, sizeof(ts)); | 114 | memset(&ts, 0, sizeof(ts)); |
115 | start = skb_find_text(*pskb, dataoff, (*pskb)->len, | 115 | start = skb_find_text(skb, dataoff, skb->len, |
116 | search[SEARCH_CONNECT].ts, &ts); | 116 | search[SEARCH_CONNECT].ts, &ts); |
117 | if (start == UINT_MAX) | 117 | if (start == UINT_MAX) |
118 | goto out; | 118 | goto out; |
119 | start += dataoff + search[SEARCH_CONNECT].len; | 119 | start += dataoff + search[SEARCH_CONNECT].len; |
120 | 120 | ||
121 | memset(&ts, 0, sizeof(ts)); | 121 | memset(&ts, 0, sizeof(ts)); |
122 | stop = skb_find_text(*pskb, start, (*pskb)->len, | 122 | stop = skb_find_text(skb, start, skb->len, |
123 | search[SEARCH_NEWLINE].ts, &ts); | 123 | search[SEARCH_NEWLINE].ts, &ts); |
124 | if (stop == UINT_MAX) | 124 | if (stop == UINT_MAX) |
125 | goto out; | 125 | goto out; |
@@ -127,13 +127,13 @@ static int amanda_help(struct sk_buff **pskb, | |||
127 | 127 | ||
128 | for (i = SEARCH_DATA; i <= SEARCH_INDEX; i++) { | 128 | for (i = SEARCH_DATA; i <= SEARCH_INDEX; i++) { |
129 | memset(&ts, 0, sizeof(ts)); | 129 | memset(&ts, 0, sizeof(ts)); |
130 | off = skb_find_text(*pskb, start, stop, search[i].ts, &ts); | 130 | off = skb_find_text(skb, start, stop, search[i].ts, &ts); |
131 | if (off == UINT_MAX) | 131 | if (off == UINT_MAX) |
132 | continue; | 132 | continue; |
133 | off += start + search[i].len; | 133 | off += start + search[i].len; |
134 | 134 | ||
135 | len = min_t(unsigned int, sizeof(pbuf) - 1, stop - off); | 135 | len = min_t(unsigned int, sizeof(pbuf) - 1, stop - off); |
136 | if (skb_copy_bits(*pskb, off, pbuf, len)) | 136 | if (skb_copy_bits(skb, off, pbuf, len)) |
137 | break; | 137 | break; |
138 | pbuf[len] = '\0'; | 138 | pbuf[len] = '\0'; |
139 | 139 | ||
@@ -153,7 +153,7 @@ static int amanda_help(struct sk_buff **pskb, | |||
153 | 153 | ||
154 | nf_nat_amanda = rcu_dereference(nf_nat_amanda_hook); | 154 | nf_nat_amanda = rcu_dereference(nf_nat_amanda_hook); |
155 | if (nf_nat_amanda && ct->status & IPS_NAT_MASK) | 155 | if (nf_nat_amanda && ct->status & IPS_NAT_MASK) |
156 | ret = nf_nat_amanda(pskb, ctinfo, off - dataoff, | 156 | ret = nf_nat_amanda(skb, ctinfo, off - dataoff, |
157 | len, exp); | 157 | len, exp); |
158 | else if (nf_ct_expect_related(exp) != 0) | 158 | else if (nf_ct_expect_related(exp) != 0) |
159 | ret = NF_DROP; | 159 | ret = NF_DROP; |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 83c30b45d170..4d6171bc0829 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 | } |
diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c index c763ee74ea02..6df259067f7e 100644 --- a/net/netfilter/nf_conntrack_ftp.c +++ b/net/netfilter/nf_conntrack_ftp.c | |||
@@ -43,7 +43,7 @@ module_param_array(ports, ushort, &ports_c, 0400); | |||
43 | static int loose; | 43 | static int loose; |
44 | module_param(loose, bool, 0600); | 44 | module_param(loose, bool, 0600); |
45 | 45 | ||
46 | unsigned int (*nf_nat_ftp_hook)(struct sk_buff **pskb, | 46 | unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb, |
47 | enum ip_conntrack_info ctinfo, | 47 | enum ip_conntrack_info ctinfo, |
48 | enum nf_ct_ftp_type type, | 48 | enum nf_ct_ftp_type type, |
49 | unsigned int matchoff, | 49 | unsigned int matchoff, |
@@ -344,7 +344,7 @@ static void update_nl_seq(u32 nl_seq, struct nf_ct_ftp_master *info, int dir, | |||
344 | } | 344 | } |
345 | } | 345 | } |
346 | 346 | ||
347 | static int help(struct sk_buff **pskb, | 347 | static int help(struct sk_buff *skb, |
348 | unsigned int protoff, | 348 | unsigned int protoff, |
349 | struct nf_conn *ct, | 349 | struct nf_conn *ct, |
350 | enum ip_conntrack_info ctinfo) | 350 | enum ip_conntrack_info ctinfo) |
@@ -371,21 +371,21 @@ static int help(struct sk_buff **pskb, | |||
371 | return NF_ACCEPT; | 371 | return NF_ACCEPT; |
372 | } | 372 | } |
373 | 373 | ||
374 | th = skb_header_pointer(*pskb, protoff, sizeof(_tcph), &_tcph); | 374 | th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); |
375 | if (th == NULL) | 375 | if (th == NULL) |
376 | return NF_ACCEPT; | 376 | return NF_ACCEPT; |
377 | 377 | ||
378 | dataoff = protoff + th->doff * 4; | 378 | dataoff = protoff + th->doff * 4; |
379 | /* No data? */ | 379 | /* No data? */ |
380 | if (dataoff >= (*pskb)->len) { | 380 | if (dataoff >= skb->len) { |
381 | pr_debug("ftp: dataoff(%u) >= skblen(%u)\n", dataoff, | 381 | pr_debug("ftp: dataoff(%u) >= skblen(%u)\n", dataoff, |
382 | (*pskb)->len); | 382 | skb->len); |
383 | return NF_ACCEPT; | 383 | return NF_ACCEPT; |
384 | } | 384 | } |
385 | datalen = (*pskb)->len - dataoff; | 385 | datalen = skb->len - dataoff; |
386 | 386 | ||
387 | spin_lock_bh(&nf_ftp_lock); | 387 | spin_lock_bh(&nf_ftp_lock); |
388 | fb_ptr = skb_header_pointer(*pskb, dataoff, datalen, ftp_buffer); | 388 | fb_ptr = skb_header_pointer(skb, dataoff, datalen, ftp_buffer); |
389 | BUG_ON(fb_ptr == NULL); | 389 | BUG_ON(fb_ptr == NULL); |
390 | 390 | ||
391 | ends_in_nl = (fb_ptr[datalen - 1] == '\n'); | 391 | ends_in_nl = (fb_ptr[datalen - 1] == '\n'); |
@@ -491,7 +491,7 @@ static int help(struct sk_buff **pskb, | |||
491 | * (possibly changed) expectation itself. */ | 491 | * (possibly changed) expectation itself. */ |
492 | nf_nat_ftp = rcu_dereference(nf_nat_ftp_hook); | 492 | nf_nat_ftp = rcu_dereference(nf_nat_ftp_hook); |
493 | if (nf_nat_ftp && ct->status & IPS_NAT_MASK) | 493 | if (nf_nat_ftp && ct->status & IPS_NAT_MASK) |
494 | ret = nf_nat_ftp(pskb, ctinfo, search[dir][i].ftptype, | 494 | ret = nf_nat_ftp(skb, ctinfo, search[dir][i].ftptype, |
495 | matchoff, matchlen, exp); | 495 | matchoff, matchlen, exp); |
496 | else { | 496 | else { |
497 | /* Can't expect this? Best to drop packet now. */ | 497 | /* Can't expect this? Best to drop packet now. */ |
@@ -508,7 +508,7 @@ out_update_nl: | |||
508 | /* Now if this ends in \n, update ftp info. Seq may have been | 508 | /* Now if this ends in \n, update ftp info. Seq may have been |
509 | * adjusted by NAT code. */ | 509 | * adjusted by NAT code. */ |
510 | if (ends_in_nl) | 510 | if (ends_in_nl) |
511 | update_nl_seq(seq, ct_ftp_info, dir, *pskb); | 511 | update_nl_seq(seq, ct_ftp_info, dir, skb); |
512 | out: | 512 | out: |
513 | spin_unlock_bh(&nf_ftp_lock); | 513 | spin_unlock_bh(&nf_ftp_lock); |
514 | return ret; | 514 | return ret; |
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c index a8a9dfbe7a67..f23fd9598e19 100644 --- a/net/netfilter/nf_conntrack_h323_main.c +++ b/net/netfilter/nf_conntrack_h323_main.c | |||
@@ -47,27 +47,27 @@ MODULE_PARM_DESC(callforward_filter, "only create call forwarding expectations " | |||
47 | "(determined by routing information)"); | 47 | "(determined by routing information)"); |
48 | 48 | ||
49 | /* Hooks for NAT */ | 49 | /* Hooks for NAT */ |
50 | int (*set_h245_addr_hook) (struct sk_buff **pskb, | 50 | int (*set_h245_addr_hook) (struct sk_buff *skb, |
51 | unsigned char **data, int dataoff, | 51 | unsigned char **data, int dataoff, |
52 | H245_TransportAddress *taddr, | 52 | H245_TransportAddress *taddr, |
53 | union nf_conntrack_address *addr, __be16 port) | 53 | union nf_conntrack_address *addr, __be16 port) |
54 | __read_mostly; | 54 | __read_mostly; |
55 | int (*set_h225_addr_hook) (struct sk_buff **pskb, | 55 | int (*set_h225_addr_hook) (struct sk_buff *skb, |
56 | unsigned char **data, int dataoff, | 56 | unsigned char **data, int dataoff, |
57 | TransportAddress *taddr, | 57 | TransportAddress *taddr, |
58 | union nf_conntrack_address *addr, __be16 port) | 58 | union nf_conntrack_address *addr, __be16 port) |
59 | __read_mostly; | 59 | __read_mostly; |
60 | int (*set_sig_addr_hook) (struct sk_buff **pskb, | 60 | int (*set_sig_addr_hook) (struct sk_buff *skb, |
61 | struct nf_conn *ct, | 61 | struct nf_conn *ct, |
62 | enum ip_conntrack_info ctinfo, | 62 | enum ip_conntrack_info ctinfo, |
63 | unsigned char **data, | 63 | unsigned char **data, |
64 | TransportAddress *taddr, int count) __read_mostly; | 64 | TransportAddress *taddr, int count) __read_mostly; |
65 | int (*set_ras_addr_hook) (struct sk_buff **pskb, | 65 | int (*set_ras_addr_hook) (struct sk_buff *skb, |
66 | struct nf_conn *ct, | 66 | struct nf_conn *ct, |
67 | enum ip_conntrack_info ctinfo, | 67 | enum ip_conntrack_info ctinfo, |
68 | unsigned char **data, | 68 | unsigned char **data, |
69 | TransportAddress *taddr, int count) __read_mostly; | 69 | TransportAddress *taddr, int count) __read_mostly; |
70 | int (*nat_rtp_rtcp_hook) (struct sk_buff **pskb, | 70 | int (*nat_rtp_rtcp_hook) (struct sk_buff *skb, |
71 | struct nf_conn *ct, | 71 | struct nf_conn *ct, |
72 | enum ip_conntrack_info ctinfo, | 72 | enum ip_conntrack_info ctinfo, |
73 | unsigned char **data, int dataoff, | 73 | unsigned char **data, int dataoff, |
@@ -75,25 +75,25 @@ int (*nat_rtp_rtcp_hook) (struct sk_buff **pskb, | |||
75 | __be16 port, __be16 rtp_port, | 75 | __be16 port, __be16 rtp_port, |
76 | struct nf_conntrack_expect *rtp_exp, | 76 | struct nf_conntrack_expect *rtp_exp, |
77 | struct nf_conntrack_expect *rtcp_exp) __read_mostly; | 77 | struct nf_conntrack_expect *rtcp_exp) __read_mostly; |
78 | int (*nat_t120_hook) (struct sk_buff **pskb, | 78 | int (*nat_t120_hook) (struct sk_buff *skb, |
79 | struct nf_conn *ct, | 79 | struct nf_conn *ct, |
80 | enum ip_conntrack_info ctinfo, | 80 | enum ip_conntrack_info ctinfo, |
81 | unsigned char **data, int dataoff, | 81 | unsigned char **data, int dataoff, |
82 | H245_TransportAddress *taddr, __be16 port, | 82 | H245_TransportAddress *taddr, __be16 port, |
83 | struct nf_conntrack_expect *exp) __read_mostly; | 83 | struct nf_conntrack_expect *exp) __read_mostly; |
84 | int (*nat_h245_hook) (struct sk_buff **pskb, | 84 | int (*nat_h245_hook) (struct sk_buff *skb, |
85 | struct nf_conn *ct, | 85 | struct nf_conn *ct, |
86 | enum ip_conntrack_info ctinfo, | 86 | enum ip_conntrack_info ctinfo, |
87 | unsigned char **data, int dataoff, | 87 | unsigned char **data, int dataoff, |
88 | TransportAddress *taddr, __be16 port, | 88 | TransportAddress *taddr, __be16 port, |
89 | struct nf_conntrack_expect *exp) __read_mostly; | 89 | struct nf_conntrack_expect *exp) __read_mostly; |
90 | int (*nat_callforwarding_hook) (struct sk_buff **pskb, | 90 | int (*nat_callforwarding_hook) (struct sk_buff *skb, |
91 | struct nf_conn *ct, | 91 | struct nf_conn *ct, |
92 | enum ip_conntrack_info ctinfo, | 92 | enum ip_conntrack_info ctinfo, |
93 | unsigned char **data, int dataoff, | 93 | unsigned char **data, int dataoff, |
94 | TransportAddress *taddr, __be16 port, | 94 | TransportAddress *taddr, __be16 port, |
95 | struct nf_conntrack_expect *exp) __read_mostly; | 95 | struct nf_conntrack_expect *exp) __read_mostly; |
96 | int (*nat_q931_hook) (struct sk_buff **pskb, | 96 | int (*nat_q931_hook) (struct sk_buff *skb, |
97 | struct nf_conn *ct, | 97 | struct nf_conn *ct, |
98 | enum ip_conntrack_info ctinfo, | 98 | enum ip_conntrack_info ctinfo, |
99 | unsigned char **data, TransportAddress *taddr, int idx, | 99 | unsigned char **data, TransportAddress *taddr, int idx, |
@@ -108,7 +108,7 @@ static struct nf_conntrack_helper nf_conntrack_helper_q931[]; | |||
108 | static struct nf_conntrack_helper nf_conntrack_helper_ras[]; | 108 | static struct nf_conntrack_helper nf_conntrack_helper_ras[]; |
109 | 109 | ||
110 | /****************************************************************************/ | 110 | /****************************************************************************/ |
111 | static int get_tpkt_data(struct sk_buff **pskb, unsigned int protoff, | 111 | static int get_tpkt_data(struct sk_buff *skb, unsigned int protoff, |
112 | struct nf_conn *ct, enum ip_conntrack_info ctinfo, | 112 | struct nf_conn *ct, enum ip_conntrack_info ctinfo, |
113 | unsigned char **data, int *datalen, int *dataoff) | 113 | unsigned char **data, int *datalen, int *dataoff) |
114 | { | 114 | { |
@@ -122,7 +122,7 @@ static int get_tpkt_data(struct sk_buff **pskb, unsigned int protoff, | |||
122 | int tpktoff; | 122 | int tpktoff; |
123 | 123 | ||
124 | /* Get TCP header */ | 124 | /* Get TCP header */ |
125 | th = skb_header_pointer(*pskb, protoff, sizeof(_tcph), &_tcph); | 125 | th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); |
126 | if (th == NULL) | 126 | if (th == NULL) |
127 | return 0; | 127 | return 0; |
128 | 128 | ||
@@ -130,13 +130,13 @@ static int get_tpkt_data(struct sk_buff **pskb, unsigned int protoff, | |||
130 | tcpdataoff = protoff + th->doff * 4; | 130 | tcpdataoff = protoff + th->doff * 4; |
131 | 131 | ||
132 | /* Get TCP data length */ | 132 | /* Get TCP data length */ |
133 | tcpdatalen = (*pskb)->len - tcpdataoff; | 133 | tcpdatalen = skb->len - tcpdataoff; |
134 | if (tcpdatalen <= 0) /* No TCP data */ | 134 | if (tcpdatalen <= 0) /* No TCP data */ |
135 | goto clear_out; | 135 | goto clear_out; |
136 | 136 | ||
137 | if (*data == NULL) { /* first TPKT */ | 137 | if (*data == NULL) { /* first TPKT */ |
138 | /* Get first TPKT pointer */ | 138 | /* Get first TPKT pointer */ |
139 | tpkt = skb_header_pointer(*pskb, tcpdataoff, tcpdatalen, | 139 | tpkt = skb_header_pointer(skb, tcpdataoff, tcpdatalen, |
140 | h323_buffer); | 140 | h323_buffer); |
141 | BUG_ON(tpkt == NULL); | 141 | BUG_ON(tpkt == NULL); |
142 | 142 | ||
@@ -248,7 +248,7 @@ static int get_h245_addr(struct nf_conn *ct, unsigned char *data, | |||
248 | } | 248 | } |
249 | 249 | ||
250 | /****************************************************************************/ | 250 | /****************************************************************************/ |
251 | static int expect_rtp_rtcp(struct sk_buff **pskb, struct nf_conn *ct, | 251 | static int expect_rtp_rtcp(struct sk_buff *skb, struct nf_conn *ct, |
252 | enum ip_conntrack_info ctinfo, | 252 | enum ip_conntrack_info ctinfo, |
253 | unsigned char **data, int dataoff, | 253 | unsigned char **data, int dataoff, |
254 | H245_TransportAddress *taddr) | 254 | H245_TransportAddress *taddr) |
@@ -297,7 +297,7 @@ static int expect_rtp_rtcp(struct sk_buff **pskb, struct nf_conn *ct, | |||
297 | (nat_rtp_rtcp = rcu_dereference(nat_rtp_rtcp_hook)) && | 297 | (nat_rtp_rtcp = rcu_dereference(nat_rtp_rtcp_hook)) && |
298 | ct->status & IPS_NAT_MASK) { | 298 | ct->status & IPS_NAT_MASK) { |
299 | /* NAT needed */ | 299 | /* NAT needed */ |
300 | ret = nat_rtp_rtcp(pskb, ct, ctinfo, data, dataoff, | 300 | ret = nat_rtp_rtcp(skb, ct, ctinfo, data, dataoff, |
301 | taddr, port, rtp_port, rtp_exp, rtcp_exp); | 301 | taddr, port, rtp_port, rtp_exp, rtcp_exp); |
302 | } else { /* Conntrack only */ | 302 | } else { /* Conntrack only */ |
303 | if (nf_ct_expect_related(rtp_exp) == 0) { | 303 | if (nf_ct_expect_related(rtp_exp) == 0) { |
@@ -321,7 +321,7 @@ static int expect_rtp_rtcp(struct sk_buff **pskb, struct nf_conn *ct, | |||
321 | } | 321 | } |
322 | 322 | ||
323 | /****************************************************************************/ | 323 | /****************************************************************************/ |
324 | static int expect_t120(struct sk_buff **pskb, | 324 | static int expect_t120(struct sk_buff *skb, |
325 | struct nf_conn *ct, | 325 | struct nf_conn *ct, |
326 | enum ip_conntrack_info ctinfo, | 326 | enum ip_conntrack_info ctinfo, |
327 | unsigned char **data, int dataoff, | 327 | unsigned char **data, int dataoff, |
@@ -355,7 +355,7 @@ static int expect_t120(struct sk_buff **pskb, | |||
355 | (nat_t120 = rcu_dereference(nat_t120_hook)) && | 355 | (nat_t120 = rcu_dereference(nat_t120_hook)) && |
356 | ct->status & IPS_NAT_MASK) { | 356 | ct->status & IPS_NAT_MASK) { |
357 | /* NAT needed */ | 357 | /* NAT needed */ |
358 | ret = nat_t120(pskb, ct, ctinfo, data, dataoff, taddr, | 358 | ret = nat_t120(skb, ct, ctinfo, data, dataoff, taddr, |
359 | port, exp); | 359 | port, exp); |
360 | } else { /* Conntrack only */ | 360 | } else { /* Conntrack only */ |
361 | if (nf_ct_expect_related(exp) == 0) { | 361 | if (nf_ct_expect_related(exp) == 0) { |
@@ -371,7 +371,7 @@ static int expect_t120(struct sk_buff **pskb, | |||
371 | } | 371 | } |
372 | 372 | ||
373 | /****************************************************************************/ | 373 | /****************************************************************************/ |
374 | static int process_h245_channel(struct sk_buff **pskb, | 374 | static int process_h245_channel(struct sk_buff *skb, |
375 | struct nf_conn *ct, | 375 | struct nf_conn *ct, |
376 | enum ip_conntrack_info ctinfo, | 376 | enum ip_conntrack_info ctinfo, |
377 | unsigned char **data, int dataoff, | 377 | unsigned char **data, int dataoff, |
@@ -381,7 +381,7 @@ static int process_h245_channel(struct sk_buff **pskb, | |||
381 | 381 | ||
382 | if (channel->options & eH2250LogicalChannelParameters_mediaChannel) { | 382 | if (channel->options & eH2250LogicalChannelParameters_mediaChannel) { |
383 | /* RTP */ | 383 | /* RTP */ |
384 | ret = expect_rtp_rtcp(pskb, ct, ctinfo, data, dataoff, | 384 | ret = expect_rtp_rtcp(skb, ct, ctinfo, data, dataoff, |
385 | &channel->mediaChannel); | 385 | &channel->mediaChannel); |
386 | if (ret < 0) | 386 | if (ret < 0) |
387 | return -1; | 387 | return -1; |
@@ -390,7 +390,7 @@ static int process_h245_channel(struct sk_buff **pskb, | |||
390 | if (channel-> | 390 | if (channel-> |
391 | options & eH2250LogicalChannelParameters_mediaControlChannel) { | 391 | options & eH2250LogicalChannelParameters_mediaControlChannel) { |
392 | /* RTCP */ | 392 | /* RTCP */ |
393 | ret = expect_rtp_rtcp(pskb, ct, ctinfo, data, dataoff, | 393 | ret = expect_rtp_rtcp(skb, ct, ctinfo, data, dataoff, |
394 | &channel->mediaControlChannel); | 394 | &channel->mediaControlChannel); |
395 | if (ret < 0) | 395 | if (ret < 0) |
396 | return -1; | 396 | return -1; |
@@ -400,7 +400,7 @@ static int process_h245_channel(struct sk_buff **pskb, | |||
400 | } | 400 | } |
401 | 401 | ||
402 | /****************************************************************************/ | 402 | /****************************************************************************/ |
403 | static int process_olc(struct sk_buff **pskb, struct nf_conn *ct, | 403 | static int process_olc(struct sk_buff *skb, struct nf_conn *ct, |
404 | enum ip_conntrack_info ctinfo, | 404 | enum ip_conntrack_info ctinfo, |
405 | unsigned char **data, int dataoff, | 405 | unsigned char **data, int dataoff, |
406 | OpenLogicalChannel *olc) | 406 | OpenLogicalChannel *olc) |
@@ -412,7 +412,7 @@ static int process_olc(struct sk_buff **pskb, struct nf_conn *ct, | |||
412 | if (olc->forwardLogicalChannelParameters.multiplexParameters.choice == | 412 | if (olc->forwardLogicalChannelParameters.multiplexParameters.choice == |
413 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters) | 413 | eOpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters) |
414 | { | 414 | { |
415 | ret = process_h245_channel(pskb, ct, ctinfo, data, dataoff, | 415 | ret = process_h245_channel(skb, ct, ctinfo, data, dataoff, |
416 | &olc-> | 416 | &olc-> |
417 | forwardLogicalChannelParameters. | 417 | forwardLogicalChannelParameters. |
418 | multiplexParameters. | 418 | multiplexParameters. |
@@ -430,7 +430,7 @@ static int process_olc(struct sk_buff **pskb, struct nf_conn *ct, | |||
430 | eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)) | 430 | eOpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)) |
431 | { | 431 | { |
432 | ret = | 432 | ret = |
433 | process_h245_channel(pskb, ct, ctinfo, data, dataoff, | 433 | process_h245_channel(skb, ct, ctinfo, data, dataoff, |
434 | &olc-> | 434 | &olc-> |
435 | reverseLogicalChannelParameters. | 435 | reverseLogicalChannelParameters. |
436 | multiplexParameters. | 436 | multiplexParameters. |
@@ -448,7 +448,7 @@ static int process_olc(struct sk_buff **pskb, struct nf_conn *ct, | |||
448 | t120.choice == eDataProtocolCapability_separateLANStack && | 448 | t120.choice == eDataProtocolCapability_separateLANStack && |
449 | olc->separateStack.networkAddress.choice == | 449 | olc->separateStack.networkAddress.choice == |
450 | eNetworkAccessParameters_networkAddress_localAreaAddress) { | 450 | eNetworkAccessParameters_networkAddress_localAreaAddress) { |
451 | ret = expect_t120(pskb, ct, ctinfo, data, dataoff, | 451 | ret = expect_t120(skb, ct, ctinfo, data, dataoff, |
452 | &olc->separateStack.networkAddress. | 452 | &olc->separateStack.networkAddress. |
453 | localAreaAddress); | 453 | localAreaAddress); |
454 | if (ret < 0) | 454 | if (ret < 0) |
@@ -459,7 +459,7 @@ static int process_olc(struct sk_buff **pskb, struct nf_conn *ct, | |||
459 | } | 459 | } |
460 | 460 | ||
461 | /****************************************************************************/ | 461 | /****************************************************************************/ |
462 | static int process_olca(struct sk_buff **pskb, struct nf_conn *ct, | 462 | static int process_olca(struct sk_buff *skb, struct nf_conn *ct, |
463 | enum ip_conntrack_info ctinfo, | 463 | enum ip_conntrack_info ctinfo, |
464 | unsigned char **data, int dataoff, | 464 | unsigned char **data, int dataoff, |
465 | OpenLogicalChannelAck *olca) | 465 | OpenLogicalChannelAck *olca) |
@@ -477,7 +477,7 @@ static int process_olca(struct sk_buff **pskb, struct nf_conn *ct, | |||
477 | choice == | 477 | choice == |
478 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)) | 478 | eOpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)) |
479 | { | 479 | { |
480 | ret = process_h245_channel(pskb, ct, ctinfo, data, dataoff, | 480 | ret = process_h245_channel(skb, ct, ctinfo, data, dataoff, |
481 | &olca-> | 481 | &olca-> |
482 | reverseLogicalChannelParameters. | 482 | reverseLogicalChannelParameters. |
483 | multiplexParameters. | 483 | multiplexParameters. |
@@ -496,7 +496,7 @@ static int process_olca(struct sk_buff **pskb, struct nf_conn *ct, | |||
496 | if (ack->options & | 496 | if (ack->options & |
497 | eH2250LogicalChannelAckParameters_mediaChannel) { | 497 | eH2250LogicalChannelAckParameters_mediaChannel) { |
498 | /* RTP */ | 498 | /* RTP */ |
499 | ret = expect_rtp_rtcp(pskb, ct, ctinfo, data, dataoff, | 499 | ret = expect_rtp_rtcp(skb, ct, ctinfo, data, dataoff, |
500 | &ack->mediaChannel); | 500 | &ack->mediaChannel); |
501 | if (ret < 0) | 501 | if (ret < 0) |
502 | return -1; | 502 | return -1; |
@@ -505,7 +505,7 @@ static int process_olca(struct sk_buff **pskb, struct nf_conn *ct, | |||
505 | if (ack->options & | 505 | if (ack->options & |
506 | eH2250LogicalChannelAckParameters_mediaControlChannel) { | 506 | eH2250LogicalChannelAckParameters_mediaControlChannel) { |
507 | /* RTCP */ | 507 | /* RTCP */ |
508 | ret = expect_rtp_rtcp(pskb, ct, ctinfo, data, dataoff, | 508 | ret = expect_rtp_rtcp(skb, ct, ctinfo, data, dataoff, |
509 | &ack->mediaControlChannel); | 509 | &ack->mediaControlChannel); |
510 | if (ret < 0) | 510 | if (ret < 0) |
511 | return -1; | 511 | return -1; |
@@ -515,7 +515,7 @@ static int process_olca(struct sk_buff **pskb, struct nf_conn *ct, | |||
515 | if ((olca->options & eOpenLogicalChannelAck_separateStack) && | 515 | if ((olca->options & eOpenLogicalChannelAck_separateStack) && |
516 | olca->separateStack.networkAddress.choice == | 516 | olca->separateStack.networkAddress.choice == |
517 | eNetworkAccessParameters_networkAddress_localAreaAddress) { | 517 | eNetworkAccessParameters_networkAddress_localAreaAddress) { |
518 | ret = expect_t120(pskb, ct, ctinfo, data, dataoff, | 518 | ret = expect_t120(skb, ct, ctinfo, data, dataoff, |
519 | &olca->separateStack.networkAddress. | 519 | &olca->separateStack.networkAddress. |
520 | localAreaAddress); | 520 | localAreaAddress); |
521 | if (ret < 0) | 521 | if (ret < 0) |
@@ -526,7 +526,7 @@ static int process_olca(struct sk_buff **pskb, struct nf_conn *ct, | |||
526 | } | 526 | } |
527 | 527 | ||
528 | /****************************************************************************/ | 528 | /****************************************************************************/ |
529 | static int process_h245(struct sk_buff **pskb, struct nf_conn *ct, | 529 | static int process_h245(struct sk_buff *skb, struct nf_conn *ct, |
530 | enum ip_conntrack_info ctinfo, | 530 | enum ip_conntrack_info ctinfo, |
531 | unsigned char **data, int dataoff, | 531 | unsigned char **data, int dataoff, |
532 | MultimediaSystemControlMessage *mscm) | 532 | MultimediaSystemControlMessage *mscm) |
@@ -535,7 +535,7 @@ static int process_h245(struct sk_buff **pskb, struct nf_conn *ct, | |||
535 | case eMultimediaSystemControlMessage_request: | 535 | case eMultimediaSystemControlMessage_request: |
536 | if (mscm->request.choice == | 536 | if (mscm->request.choice == |
537 | eRequestMessage_openLogicalChannel) { | 537 | eRequestMessage_openLogicalChannel) { |
538 | return process_olc(pskb, ct, ctinfo, data, dataoff, | 538 | return process_olc(skb, ct, ctinfo, data, dataoff, |
539 | &mscm->request.openLogicalChannel); | 539 | &mscm->request.openLogicalChannel); |
540 | } | 540 | } |
541 | pr_debug("nf_ct_h323: H.245 Request %d\n", | 541 | pr_debug("nf_ct_h323: H.245 Request %d\n", |
@@ -544,7 +544,7 @@ static int process_h245(struct sk_buff **pskb, struct nf_conn *ct, | |||
544 | case eMultimediaSystemControlMessage_response: | 544 | case eMultimediaSystemControlMessage_response: |
545 | if (mscm->response.choice == | 545 | if (mscm->response.choice == |
546 | eResponseMessage_openLogicalChannelAck) { | 546 | eResponseMessage_openLogicalChannelAck) { |
547 | return process_olca(pskb, ct, ctinfo, data, dataoff, | 547 | return process_olca(skb, ct, ctinfo, data, dataoff, |
548 | &mscm->response. | 548 | &mscm->response. |
549 | openLogicalChannelAck); | 549 | openLogicalChannelAck); |
550 | } | 550 | } |
@@ -560,7 +560,7 @@ static int process_h245(struct sk_buff **pskb, struct nf_conn *ct, | |||
560 | } | 560 | } |
561 | 561 | ||
562 | /****************************************************************************/ | 562 | /****************************************************************************/ |
563 | static int h245_help(struct sk_buff **pskb, unsigned int protoff, | 563 | static int h245_help(struct sk_buff *skb, unsigned int protoff, |
564 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) | 564 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) |
565 | { | 565 | { |
566 | static MultimediaSystemControlMessage mscm; | 566 | static MultimediaSystemControlMessage mscm; |
@@ -574,12 +574,12 @@ static int h245_help(struct sk_buff **pskb, unsigned int protoff, | |||
574 | ctinfo != IP_CT_ESTABLISHED + IP_CT_IS_REPLY) { | 574 | ctinfo != IP_CT_ESTABLISHED + IP_CT_IS_REPLY) { |
575 | return NF_ACCEPT; | 575 | return NF_ACCEPT; |
576 | } | 576 | } |
577 | pr_debug("nf_ct_h245: skblen = %u\n", (*pskb)->len); | 577 | pr_debug("nf_ct_h245: skblen = %u\n", skb->len); |
578 | 578 | ||
579 | spin_lock_bh(&nf_h323_lock); | 579 | spin_lock_bh(&nf_h323_lock); |
580 | 580 | ||
581 | /* Process each TPKT */ | 581 | /* Process each TPKT */ |
582 | while (get_tpkt_data(pskb, protoff, ct, ctinfo, | 582 | while (get_tpkt_data(skb, protoff, ct, ctinfo, |
583 | &data, &datalen, &dataoff)) { | 583 | &data, &datalen, &dataoff)) { |
584 | pr_debug("nf_ct_h245: TPKT len=%d ", datalen); | 584 | pr_debug("nf_ct_h245: TPKT len=%d ", datalen); |
585 | NF_CT_DUMP_TUPLE(&ct->tuplehash[CTINFO2DIR(ctinfo)].tuple); | 585 | NF_CT_DUMP_TUPLE(&ct->tuplehash[CTINFO2DIR(ctinfo)].tuple); |
@@ -596,7 +596,7 @@ static int h245_help(struct sk_buff **pskb, unsigned int protoff, | |||
596 | } | 596 | } |
597 | 597 | ||
598 | /* Process H.245 signal */ | 598 | /* Process H.245 signal */ |
599 | if (process_h245(pskb, ct, ctinfo, &data, dataoff, &mscm) < 0) | 599 | if (process_h245(skb, ct, ctinfo, &data, dataoff, &mscm) < 0) |
600 | goto drop; | 600 | goto drop; |
601 | } | 601 | } |
602 | 602 | ||
@@ -654,7 +654,7 @@ int get_h225_addr(struct nf_conn *ct, unsigned char *data, | |||
654 | } | 654 | } |
655 | 655 | ||
656 | /****************************************************************************/ | 656 | /****************************************************************************/ |
657 | static int expect_h245(struct sk_buff **pskb, struct nf_conn *ct, | 657 | static int expect_h245(struct sk_buff *skb, struct nf_conn *ct, |
658 | enum ip_conntrack_info ctinfo, | 658 | enum ip_conntrack_info ctinfo, |
659 | unsigned char **data, int dataoff, | 659 | unsigned char **data, int dataoff, |
660 | TransportAddress *taddr) | 660 | TransportAddress *taddr) |
@@ -687,7 +687,7 @@ static int expect_h245(struct sk_buff **pskb, struct nf_conn *ct, | |||
687 | (nat_h245 = rcu_dereference(nat_h245_hook)) && | 687 | (nat_h245 = rcu_dereference(nat_h245_hook)) && |
688 | ct->status & IPS_NAT_MASK) { | 688 | ct->status & IPS_NAT_MASK) { |
689 | /* NAT needed */ | 689 | /* NAT needed */ |
690 | ret = nat_h245(pskb, ct, ctinfo, data, dataoff, taddr, | 690 | ret = nat_h245(skb, ct, ctinfo, data, dataoff, taddr, |
691 | port, exp); | 691 | port, exp); |
692 | } else { /* Conntrack only */ | 692 | } else { /* Conntrack only */ |
693 | if (nf_ct_expect_related(exp) == 0) { | 693 | if (nf_ct_expect_related(exp) == 0) { |
@@ -758,7 +758,7 @@ static int callforward_do_filter(union nf_conntrack_address *src, | |||
758 | } | 758 | } |
759 | 759 | ||
760 | /****************************************************************************/ | 760 | /****************************************************************************/ |
761 | static int expect_callforwarding(struct sk_buff **pskb, | 761 | static int expect_callforwarding(struct sk_buff *skb, |
762 | struct nf_conn *ct, | 762 | struct nf_conn *ct, |
763 | enum ip_conntrack_info ctinfo, | 763 | enum ip_conntrack_info ctinfo, |
764 | unsigned char **data, int dataoff, | 764 | unsigned char **data, int dataoff, |
@@ -798,7 +798,7 @@ static int expect_callforwarding(struct sk_buff **pskb, | |||
798 | (nat_callforwarding = rcu_dereference(nat_callforwarding_hook)) && | 798 | (nat_callforwarding = rcu_dereference(nat_callforwarding_hook)) && |
799 | ct->status & IPS_NAT_MASK) { | 799 | ct->status & IPS_NAT_MASK) { |
800 | /* Need NAT */ | 800 | /* Need NAT */ |
801 | ret = nat_callforwarding(pskb, ct, ctinfo, data, dataoff, | 801 | ret = nat_callforwarding(skb, ct, ctinfo, data, dataoff, |
802 | taddr, port, exp); | 802 | taddr, port, exp); |
803 | } else { /* Conntrack only */ | 803 | } else { /* Conntrack only */ |
804 | if (nf_ct_expect_related(exp) == 0) { | 804 | if (nf_ct_expect_related(exp) == 0) { |
@@ -814,7 +814,7 @@ static int expect_callforwarding(struct sk_buff **pskb, | |||
814 | } | 814 | } |
815 | 815 | ||
816 | /****************************************************************************/ | 816 | /****************************************************************************/ |
817 | static int process_setup(struct sk_buff **pskb, struct nf_conn *ct, | 817 | static int process_setup(struct sk_buff *skb, struct nf_conn *ct, |
818 | enum ip_conntrack_info ctinfo, | 818 | enum ip_conntrack_info ctinfo, |
819 | unsigned char **data, int dataoff, | 819 | unsigned char **data, int dataoff, |
820 | Setup_UUIE *setup) | 820 | Setup_UUIE *setup) |
@@ -829,7 +829,7 @@ static int process_setup(struct sk_buff **pskb, struct nf_conn *ct, | |||
829 | pr_debug("nf_ct_q931: Setup\n"); | 829 | pr_debug("nf_ct_q931: Setup\n"); |
830 | 830 | ||
831 | if (setup->options & eSetup_UUIE_h245Address) { | 831 | if (setup->options & eSetup_UUIE_h245Address) { |
832 | ret = expect_h245(pskb, ct, ctinfo, data, dataoff, | 832 | ret = expect_h245(skb, ct, ctinfo, data, dataoff, |
833 | &setup->h245Address); | 833 | &setup->h245Address); |
834 | if (ret < 0) | 834 | if (ret < 0) |
835 | return -1; | 835 | return -1; |
@@ -846,7 +846,7 @@ static int process_setup(struct sk_buff **pskb, struct nf_conn *ct, | |||
846 | NIP6(*(struct in6_addr *)&addr), ntohs(port), | 846 | NIP6(*(struct in6_addr *)&addr), ntohs(port), |
847 | NIP6(*(struct in6_addr *)&ct->tuplehash[!dir].tuple.src.u3), | 847 | NIP6(*(struct in6_addr *)&ct->tuplehash[!dir].tuple.src.u3), |
848 | ntohs(ct->tuplehash[!dir].tuple.src.u.tcp.port)); | 848 | ntohs(ct->tuplehash[!dir].tuple.src.u.tcp.port)); |
849 | ret = set_h225_addr(pskb, data, dataoff, | 849 | ret = set_h225_addr(skb, data, dataoff, |
850 | &setup->destCallSignalAddress, | 850 | &setup->destCallSignalAddress, |
851 | &ct->tuplehash[!dir].tuple.src.u3, | 851 | &ct->tuplehash[!dir].tuple.src.u3, |
852 | ct->tuplehash[!dir].tuple.src.u.tcp.port); | 852 | ct->tuplehash[!dir].tuple.src.u.tcp.port); |
@@ -864,7 +864,7 @@ static int process_setup(struct sk_buff **pskb, struct nf_conn *ct, | |||
864 | NIP6(*(struct in6_addr *)&addr), ntohs(port), | 864 | NIP6(*(struct in6_addr *)&addr), ntohs(port), |
865 | NIP6(*(struct in6_addr *)&ct->tuplehash[!dir].tuple.dst.u3), | 865 | NIP6(*(struct in6_addr *)&ct->tuplehash[!dir].tuple.dst.u3), |
866 | ntohs(ct->tuplehash[!dir].tuple.dst.u.tcp.port)); | 866 | ntohs(ct->tuplehash[!dir].tuple.dst.u.tcp.port)); |
867 | ret = set_h225_addr(pskb, data, dataoff, | 867 | ret = set_h225_addr(skb, data, dataoff, |
868 | &setup->sourceCallSignalAddress, | 868 | &setup->sourceCallSignalAddress, |
869 | &ct->tuplehash[!dir].tuple.dst.u3, | 869 | &ct->tuplehash[!dir].tuple.dst.u3, |
870 | ct->tuplehash[!dir].tuple.dst.u.tcp.port); | 870 | ct->tuplehash[!dir].tuple.dst.u.tcp.port); |
@@ -874,7 +874,7 @@ static int process_setup(struct sk_buff **pskb, struct nf_conn *ct, | |||
874 | 874 | ||
875 | if (setup->options & eSetup_UUIE_fastStart) { | 875 | if (setup->options & eSetup_UUIE_fastStart) { |
876 | for (i = 0; i < setup->fastStart.count; i++) { | 876 | for (i = 0; i < setup->fastStart.count; i++) { |
877 | ret = process_olc(pskb, ct, ctinfo, data, dataoff, | 877 | ret = process_olc(skb, ct, ctinfo, data, dataoff, |
878 | &setup->fastStart.item[i]); | 878 | &setup->fastStart.item[i]); |
879 | if (ret < 0) | 879 | if (ret < 0) |
880 | return -1; | 880 | return -1; |
@@ -885,7 +885,7 @@ static int process_setup(struct sk_buff **pskb, struct nf_conn *ct, | |||
885 | } | 885 | } |
886 | 886 | ||
887 | /****************************************************************************/ | 887 | /****************************************************************************/ |
888 | static int process_callproceeding(struct sk_buff **pskb, | 888 | static int process_callproceeding(struct sk_buff *skb, |
889 | struct nf_conn *ct, | 889 | struct nf_conn *ct, |
890 | enum ip_conntrack_info ctinfo, | 890 | enum ip_conntrack_info ctinfo, |
891 | unsigned char **data, int dataoff, | 891 | unsigned char **data, int dataoff, |
@@ -897,7 +897,7 @@ static int process_callproceeding(struct sk_buff **pskb, | |||
897 | pr_debug("nf_ct_q931: CallProceeding\n"); | 897 | pr_debug("nf_ct_q931: CallProceeding\n"); |
898 | 898 | ||
899 | if (callproc->options & eCallProceeding_UUIE_h245Address) { | 899 | if (callproc->options & eCallProceeding_UUIE_h245Address) { |
900 | ret = expect_h245(pskb, ct, ctinfo, data, dataoff, | 900 | ret = expect_h245(skb, ct, ctinfo, data, dataoff, |
901 | &callproc->h245Address); | 901 | &callproc->h245Address); |
902 | if (ret < 0) | 902 | if (ret < 0) |
903 | return -1; | 903 | return -1; |
@@ -905,7 +905,7 @@ static int process_callproceeding(struct sk_buff **pskb, | |||
905 | 905 | ||
906 | if (callproc->options & eCallProceeding_UUIE_fastStart) { | 906 | if (callproc->options & eCallProceeding_UUIE_fastStart) { |
907 | for (i = 0; i < callproc->fastStart.count; i++) { | 907 | for (i = 0; i < callproc->fastStart.count; i++) { |
908 | ret = process_olc(pskb, ct, ctinfo, data, dataoff, | 908 | ret = process_olc(skb, ct, ctinfo, data, dataoff, |
909 | &callproc->fastStart.item[i]); | 909 | &callproc->fastStart.item[i]); |
910 | if (ret < 0) | 910 | if (ret < 0) |
911 | return -1; | 911 | return -1; |
@@ -916,7 +916,7 @@ static int process_callproceeding(struct sk_buff **pskb, | |||
916 | } | 916 | } |
917 | 917 | ||
918 | /****************************************************************************/ | 918 | /****************************************************************************/ |
919 | static int process_connect(struct sk_buff **pskb, struct nf_conn *ct, | 919 | static int process_connect(struct sk_buff *skb, struct nf_conn *ct, |
920 | enum ip_conntrack_info ctinfo, | 920 | enum ip_conntrack_info ctinfo, |
921 | unsigned char **data, int dataoff, | 921 | unsigned char **data, int dataoff, |
922 | Connect_UUIE *connect) | 922 | Connect_UUIE *connect) |
@@ -927,7 +927,7 @@ static int process_connect(struct sk_buff **pskb, struct nf_conn *ct, | |||
927 | pr_debug("nf_ct_q931: Connect\n"); | 927 | pr_debug("nf_ct_q931: Connect\n"); |
928 | 928 | ||
929 | if (connect->options & eConnect_UUIE_h245Address) { | 929 | if (connect->options & eConnect_UUIE_h245Address) { |
930 | ret = expect_h245(pskb, ct, ctinfo, data, dataoff, | 930 | ret = expect_h245(skb, ct, ctinfo, data, dataoff, |
931 | &connect->h245Address); | 931 | &connect->h245Address); |
932 | if (ret < 0) | 932 | if (ret < 0) |
933 | return -1; | 933 | return -1; |
@@ -935,7 +935,7 @@ static int process_connect(struct sk_buff **pskb, struct nf_conn *ct, | |||
935 | 935 | ||
936 | if (connect->options & eConnect_UUIE_fastStart) { | 936 | if (connect->options & eConnect_UUIE_fastStart) { |
937 | for (i = 0; i < connect->fastStart.count; i++) { | 937 | for (i = 0; i < connect->fastStart.count; i++) { |
938 | ret = process_olc(pskb, ct, ctinfo, data, dataoff, | 938 | ret = process_olc(skb, ct, ctinfo, data, dataoff, |
939 | &connect->fastStart.item[i]); | 939 | &connect->fastStart.item[i]); |
940 | if (ret < 0) | 940 | if (ret < 0) |
941 | return -1; | 941 | return -1; |
@@ -946,7 +946,7 @@ static int process_connect(struct sk_buff **pskb, struct nf_conn *ct, | |||
946 | } | 946 | } |
947 | 947 | ||
948 | /****************************************************************************/ | 948 | /****************************************************************************/ |
949 | static int process_alerting(struct sk_buff **pskb, struct nf_conn *ct, | 949 | static int process_alerting(struct sk_buff *skb, struct nf_conn *ct, |
950 | enum ip_conntrack_info ctinfo, | 950 | enum ip_conntrack_info ctinfo, |
951 | unsigned char **data, int dataoff, | 951 | unsigned char **data, int dataoff, |
952 | Alerting_UUIE *alert) | 952 | Alerting_UUIE *alert) |
@@ -957,7 +957,7 @@ static int process_alerting(struct sk_buff **pskb, struct nf_conn *ct, | |||
957 | pr_debug("nf_ct_q931: Alerting\n"); | 957 | pr_debug("nf_ct_q931: Alerting\n"); |
958 | 958 | ||
959 | if (alert->options & eAlerting_UUIE_h245Address) { | 959 | if (alert->options & eAlerting_UUIE_h245Address) { |
960 | ret = expect_h245(pskb, ct, ctinfo, data, dataoff, | 960 | ret = expect_h245(skb, ct, ctinfo, data, dataoff, |
961 | &alert->h245Address); | 961 | &alert->h245Address); |
962 | if (ret < 0) | 962 | if (ret < 0) |
963 | return -1; | 963 | return -1; |
@@ -965,7 +965,7 @@ static int process_alerting(struct sk_buff **pskb, struct nf_conn *ct, | |||
965 | 965 | ||
966 | if (alert->options & eAlerting_UUIE_fastStart) { | 966 | if (alert->options & eAlerting_UUIE_fastStart) { |
967 | for (i = 0; i < alert->fastStart.count; i++) { | 967 | for (i = 0; i < alert->fastStart.count; i++) { |
968 | ret = process_olc(pskb, ct, ctinfo, data, dataoff, | 968 | ret = process_olc(skb, ct, ctinfo, data, dataoff, |
969 | &alert->fastStart.item[i]); | 969 | &alert->fastStart.item[i]); |
970 | if (ret < 0) | 970 | if (ret < 0) |
971 | return -1; | 971 | return -1; |
@@ -976,7 +976,7 @@ static int process_alerting(struct sk_buff **pskb, struct nf_conn *ct, | |||
976 | } | 976 | } |
977 | 977 | ||
978 | /****************************************************************************/ | 978 | /****************************************************************************/ |
979 | static int process_facility(struct sk_buff **pskb, struct nf_conn *ct, | 979 | static int process_facility(struct sk_buff *skb, struct nf_conn *ct, |
980 | enum ip_conntrack_info ctinfo, | 980 | enum ip_conntrack_info ctinfo, |
981 | unsigned char **data, int dataoff, | 981 | unsigned char **data, int dataoff, |
982 | Facility_UUIE *facility) | 982 | Facility_UUIE *facility) |
@@ -988,7 +988,7 @@ static int process_facility(struct sk_buff **pskb, struct nf_conn *ct, | |||
988 | 988 | ||
989 | if (facility->reason.choice == eFacilityReason_callForwarded) { | 989 | if (facility->reason.choice == eFacilityReason_callForwarded) { |
990 | if (facility->options & eFacility_UUIE_alternativeAddress) | 990 | if (facility->options & eFacility_UUIE_alternativeAddress) |
991 | return expect_callforwarding(pskb, ct, ctinfo, data, | 991 | return expect_callforwarding(skb, ct, ctinfo, data, |
992 | dataoff, | 992 | dataoff, |
993 | &facility-> | 993 | &facility-> |
994 | alternativeAddress); | 994 | alternativeAddress); |
@@ -996,7 +996,7 @@ static int process_facility(struct sk_buff **pskb, struct nf_conn *ct, | |||
996 | } | 996 | } |
997 | 997 | ||
998 | if (facility->options & eFacility_UUIE_h245Address) { | 998 | if (facility->options & eFacility_UUIE_h245Address) { |
999 | ret = expect_h245(pskb, ct, ctinfo, data, dataoff, | 999 | ret = expect_h245(skb, ct, ctinfo, data, dataoff, |
1000 | &facility->h245Address); | 1000 | &facility->h245Address); |
1001 | if (ret < 0) | 1001 | if (ret < 0) |
1002 | return -1; | 1002 | return -1; |
@@ -1004,7 +1004,7 @@ static int process_facility(struct sk_buff **pskb, struct nf_conn *ct, | |||
1004 | 1004 | ||
1005 | if (facility->options & eFacility_UUIE_fastStart) { | 1005 | if (facility->options & eFacility_UUIE_fastStart) { |
1006 | for (i = 0; i < facility->fastStart.count; i++) { | 1006 | for (i = 0; i < facility->fastStart.count; i++) { |
1007 | ret = process_olc(pskb, ct, ctinfo, data, dataoff, | 1007 | ret = process_olc(skb, ct, ctinfo, data, dataoff, |
1008 | &facility->fastStart.item[i]); | 1008 | &facility->fastStart.item[i]); |
1009 | if (ret < 0) | 1009 | if (ret < 0) |
1010 | return -1; | 1010 | return -1; |
@@ -1015,7 +1015,7 @@ static int process_facility(struct sk_buff **pskb, struct nf_conn *ct, | |||
1015 | } | 1015 | } |
1016 | 1016 | ||
1017 | /****************************************************************************/ | 1017 | /****************************************************************************/ |
1018 | static int process_progress(struct sk_buff **pskb, struct nf_conn *ct, | 1018 | static int process_progress(struct sk_buff *skb, struct nf_conn *ct, |
1019 | enum ip_conntrack_info ctinfo, | 1019 | enum ip_conntrack_info ctinfo, |
1020 | unsigned char **data, int dataoff, | 1020 | unsigned char **data, int dataoff, |
1021 | Progress_UUIE *progress) | 1021 | Progress_UUIE *progress) |
@@ -1026,7 +1026,7 @@ static int process_progress(struct sk_buff **pskb, struct nf_conn *ct, | |||
1026 | pr_debug("nf_ct_q931: Progress\n"); | 1026 | pr_debug("nf_ct_q931: Progress\n"); |
1027 | 1027 | ||
1028 | if (progress->options & eProgress_UUIE_h245Address) { | 1028 | if (progress->options & eProgress_UUIE_h245Address) { |
1029 | ret = expect_h245(pskb, ct, ctinfo, data, dataoff, | 1029 | ret = expect_h245(skb, ct, ctinfo, data, dataoff, |
1030 | &progress->h245Address); | 1030 | &progress->h245Address); |
1031 | if (ret < 0) | 1031 | if (ret < 0) |
1032 | return -1; | 1032 | return -1; |
@@ -1034,7 +1034,7 @@ static int process_progress(struct sk_buff **pskb, struct nf_conn *ct, | |||
1034 | 1034 | ||
1035 | if (progress->options & eProgress_UUIE_fastStart) { | 1035 | if (progress->options & eProgress_UUIE_fastStart) { |
1036 | for (i = 0; i < progress->fastStart.count; i++) { | 1036 | for (i = 0; i < progress->fastStart.count; i++) { |
1037 | ret = process_olc(pskb, ct, ctinfo, data, dataoff, | 1037 | ret = process_olc(skb, ct, ctinfo, data, dataoff, |
1038 | &progress->fastStart.item[i]); | 1038 | &progress->fastStart.item[i]); |
1039 | if (ret < 0) | 1039 | if (ret < 0) |
1040 | return -1; | 1040 | return -1; |
@@ -1045,7 +1045,7 @@ static int process_progress(struct sk_buff **pskb, struct nf_conn *ct, | |||
1045 | } | 1045 | } |
1046 | 1046 | ||
1047 | /****************************************************************************/ | 1047 | /****************************************************************************/ |
1048 | static int process_q931(struct sk_buff **pskb, struct nf_conn *ct, | 1048 | static int process_q931(struct sk_buff *skb, struct nf_conn *ct, |
1049 | enum ip_conntrack_info ctinfo, | 1049 | enum ip_conntrack_info ctinfo, |
1050 | unsigned char **data, int dataoff, Q931 *q931) | 1050 | unsigned char **data, int dataoff, Q931 *q931) |
1051 | { | 1051 | { |
@@ -1055,28 +1055,28 @@ static int process_q931(struct sk_buff **pskb, struct nf_conn *ct, | |||
1055 | 1055 | ||
1056 | switch (pdu->h323_message_body.choice) { | 1056 | switch (pdu->h323_message_body.choice) { |
1057 | case eH323_UU_PDU_h323_message_body_setup: | 1057 | case eH323_UU_PDU_h323_message_body_setup: |
1058 | ret = process_setup(pskb, ct, ctinfo, data, dataoff, | 1058 | ret = process_setup(skb, ct, ctinfo, data, dataoff, |
1059 | &pdu->h323_message_body.setup); | 1059 | &pdu->h323_message_body.setup); |
1060 | break; | 1060 | break; |
1061 | case eH323_UU_PDU_h323_message_body_callProceeding: | 1061 | case eH323_UU_PDU_h323_message_body_callProceeding: |
1062 | ret = process_callproceeding(pskb, ct, ctinfo, data, dataoff, | 1062 | ret = process_callproceeding(skb, ct, ctinfo, data, dataoff, |
1063 | &pdu->h323_message_body. | 1063 | &pdu->h323_message_body. |
1064 | callProceeding); | 1064 | callProceeding); |
1065 | break; | 1065 | break; |
1066 | case eH323_UU_PDU_h323_message_body_connect: | 1066 | case eH323_UU_PDU_h323_message_body_connect: |
1067 | ret = process_connect(pskb, ct, ctinfo, data, dataoff, | 1067 | ret = process_connect(skb, ct, ctinfo, data, dataoff, |
1068 | &pdu->h323_message_body.connect); | 1068 | &pdu->h323_message_body.connect); |
1069 | break; | 1069 | break; |
1070 | case eH323_UU_PDU_h323_message_body_alerting: | 1070 | case eH323_UU_PDU_h323_message_body_alerting: |
1071 | ret = process_alerting(pskb, ct, ctinfo, data, dataoff, | 1071 | ret = process_alerting(skb, ct, ctinfo, data, dataoff, |
1072 | &pdu->h323_message_body.alerting); | 1072 | &pdu->h323_message_body.alerting); |
1073 | break; | 1073 | break; |
1074 | case eH323_UU_PDU_h323_message_body_facility: | 1074 | case eH323_UU_PDU_h323_message_body_facility: |
1075 | ret = process_facility(pskb, ct, ctinfo, data, dataoff, | 1075 | ret = process_facility(skb, ct, ctinfo, data, dataoff, |
1076 | &pdu->h323_message_body.facility); | 1076 | &pdu->h323_message_body.facility); |
1077 | break; | 1077 | break; |
1078 | case eH323_UU_PDU_h323_message_body_progress: | 1078 | case eH323_UU_PDU_h323_message_body_progress: |
1079 | ret = process_progress(pskb, ct, ctinfo, data, dataoff, | 1079 | ret = process_progress(skb, ct, ctinfo, data, dataoff, |
1080 | &pdu->h323_message_body.progress); | 1080 | &pdu->h323_message_body.progress); |
1081 | break; | 1081 | break; |
1082 | default: | 1082 | default: |
@@ -1090,7 +1090,7 @@ static int process_q931(struct sk_buff **pskb, struct nf_conn *ct, | |||
1090 | 1090 | ||
1091 | if (pdu->options & eH323_UU_PDU_h245Control) { | 1091 | if (pdu->options & eH323_UU_PDU_h245Control) { |
1092 | for (i = 0; i < pdu->h245Control.count; i++) { | 1092 | for (i = 0; i < pdu->h245Control.count; i++) { |
1093 | ret = process_h245(pskb, ct, ctinfo, data, dataoff, | 1093 | ret = process_h245(skb, ct, ctinfo, data, dataoff, |
1094 | &pdu->h245Control.item[i]); | 1094 | &pdu->h245Control.item[i]); |
1095 | if (ret < 0) | 1095 | if (ret < 0) |
1096 | return -1; | 1096 | return -1; |
@@ -1101,7 +1101,7 @@ static int process_q931(struct sk_buff **pskb, struct nf_conn *ct, | |||
1101 | } | 1101 | } |
1102 | 1102 | ||
1103 | /****************************************************************************/ | 1103 | /****************************************************************************/ |
1104 | static int q931_help(struct sk_buff **pskb, unsigned int protoff, | 1104 | static int q931_help(struct sk_buff *skb, unsigned int protoff, |
1105 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) | 1105 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) |
1106 | { | 1106 | { |
1107 | static Q931 q931; | 1107 | static Q931 q931; |
@@ -1115,12 +1115,12 @@ static int q931_help(struct sk_buff **pskb, unsigned int protoff, | |||
1115 | ctinfo != IP_CT_ESTABLISHED + IP_CT_IS_REPLY) { | 1115 | ctinfo != IP_CT_ESTABLISHED + IP_CT_IS_REPLY) { |
1116 | return NF_ACCEPT; | 1116 | return NF_ACCEPT; |
1117 | } | 1117 | } |
1118 | pr_debug("nf_ct_q931: skblen = %u\n", (*pskb)->len); | 1118 | pr_debug("nf_ct_q931: skblen = %u\n", skb->len); |
1119 | 1119 | ||
1120 | spin_lock_bh(&nf_h323_lock); | 1120 | spin_lock_bh(&nf_h323_lock); |
1121 | 1121 | ||
1122 | /* Process each TPKT */ | 1122 | /* Process each TPKT */ |
1123 | while (get_tpkt_data(pskb, protoff, ct, ctinfo, | 1123 | while (get_tpkt_data(skb, protoff, ct, ctinfo, |
1124 | &data, &datalen, &dataoff)) { | 1124 | &data, &datalen, &dataoff)) { |
1125 | pr_debug("nf_ct_q931: TPKT len=%d ", datalen); | 1125 | pr_debug("nf_ct_q931: TPKT len=%d ", datalen); |
1126 | NF_CT_DUMP_TUPLE(&ct->tuplehash[CTINFO2DIR(ctinfo)].tuple); | 1126 | NF_CT_DUMP_TUPLE(&ct->tuplehash[CTINFO2DIR(ctinfo)].tuple); |
@@ -1136,7 +1136,7 @@ static int q931_help(struct sk_buff **pskb, unsigned int protoff, | |||
1136 | } | 1136 | } |
1137 | 1137 | ||
1138 | /* Process Q.931 signal */ | 1138 | /* Process Q.931 signal */ |
1139 | if (process_q931(pskb, ct, ctinfo, &data, dataoff, &q931) < 0) | 1139 | if (process_q931(skb, ct, ctinfo, &data, dataoff, &q931) < 0) |
1140 | goto drop; | 1140 | goto drop; |
1141 | } | 1141 | } |
1142 | 1142 | ||
@@ -1177,20 +1177,20 @@ static struct nf_conntrack_helper nf_conntrack_helper_q931[] __read_mostly = { | |||
1177 | }; | 1177 | }; |
1178 | 1178 | ||
1179 | /****************************************************************************/ | 1179 | /****************************************************************************/ |
1180 | static unsigned char *get_udp_data(struct sk_buff **pskb, unsigned int protoff, | 1180 | static unsigned char *get_udp_data(struct sk_buff *skb, unsigned int protoff, |
1181 | int *datalen) | 1181 | int *datalen) |
1182 | { | 1182 | { |
1183 | struct udphdr _uh, *uh; | 1183 | struct udphdr _uh, *uh; |
1184 | int dataoff; | 1184 | int dataoff; |
1185 | 1185 | ||
1186 | uh = skb_header_pointer(*pskb, protoff, sizeof(_uh), &_uh); | 1186 | uh = skb_header_pointer(skb, protoff, sizeof(_uh), &_uh); |
1187 | if (uh == NULL) | 1187 | if (uh == NULL) |
1188 | return NULL; | 1188 | return NULL; |
1189 | dataoff = protoff + sizeof(_uh); | 1189 | dataoff = protoff + sizeof(_uh); |
1190 | if (dataoff >= (*pskb)->len) | 1190 | if (dataoff >= skb->len) |
1191 | return NULL; | 1191 | return NULL; |
1192 | *datalen = (*pskb)->len - dataoff; | 1192 | *datalen = skb->len - dataoff; |
1193 | return skb_header_pointer(*pskb, dataoff, *datalen, h323_buffer); | 1193 | return skb_header_pointer(skb, dataoff, *datalen, h323_buffer); |
1194 | } | 1194 | } |
1195 | 1195 | ||
1196 | /****************************************************************************/ | 1196 | /****************************************************************************/ |
@@ -1227,7 +1227,7 @@ static int set_expect_timeout(struct nf_conntrack_expect *exp, | |||
1227 | } | 1227 | } |
1228 | 1228 | ||
1229 | /****************************************************************************/ | 1229 | /****************************************************************************/ |
1230 | static int expect_q931(struct sk_buff **pskb, struct nf_conn *ct, | 1230 | static int expect_q931(struct sk_buff *skb, struct nf_conn *ct, |
1231 | enum ip_conntrack_info ctinfo, | 1231 | enum ip_conntrack_info ctinfo, |
1232 | unsigned char **data, | 1232 | unsigned char **data, |
1233 | TransportAddress *taddr, int count) | 1233 | TransportAddress *taddr, int count) |
@@ -1265,7 +1265,7 @@ static int expect_q931(struct sk_buff **pskb, struct nf_conn *ct, | |||
1265 | 1265 | ||
1266 | nat_q931 = rcu_dereference(nat_q931_hook); | 1266 | nat_q931 = rcu_dereference(nat_q931_hook); |
1267 | if (nat_q931 && ct->status & IPS_NAT_MASK) { /* Need NAT */ | 1267 | if (nat_q931 && ct->status & IPS_NAT_MASK) { /* Need NAT */ |
1268 | ret = nat_q931(pskb, ct, ctinfo, data, taddr, i, port, exp); | 1268 | ret = nat_q931(skb, ct, ctinfo, data, taddr, i, port, exp); |
1269 | } else { /* Conntrack only */ | 1269 | } else { /* Conntrack only */ |
1270 | if (nf_ct_expect_related(exp) == 0) { | 1270 | if (nf_ct_expect_related(exp) == 0) { |
1271 | pr_debug("nf_ct_ras: expect Q.931 "); | 1271 | pr_debug("nf_ct_ras: expect Q.931 "); |
@@ -1283,7 +1283,7 @@ static int expect_q931(struct sk_buff **pskb, struct nf_conn *ct, | |||
1283 | } | 1283 | } |
1284 | 1284 | ||
1285 | /****************************************************************************/ | 1285 | /****************************************************************************/ |
1286 | static int process_grq(struct sk_buff **pskb, struct nf_conn *ct, | 1286 | static int process_grq(struct sk_buff *skb, struct nf_conn *ct, |
1287 | enum ip_conntrack_info ctinfo, | 1287 | enum ip_conntrack_info ctinfo, |
1288 | unsigned char **data, GatekeeperRequest *grq) | 1288 | unsigned char **data, GatekeeperRequest *grq) |
1289 | { | 1289 | { |
@@ -1293,13 +1293,13 @@ static int process_grq(struct sk_buff **pskb, struct nf_conn *ct, | |||
1293 | 1293 | ||
1294 | set_ras_addr = rcu_dereference(set_ras_addr_hook); | 1294 | set_ras_addr = rcu_dereference(set_ras_addr_hook); |
1295 | if (set_ras_addr && ct->status & IPS_NAT_MASK) /* NATed */ | 1295 | if (set_ras_addr && ct->status & IPS_NAT_MASK) /* NATed */ |
1296 | return set_ras_addr(pskb, ct, ctinfo, data, | 1296 | return set_ras_addr(skb, ct, ctinfo, data, |
1297 | &grq->rasAddress, 1); | 1297 | &grq->rasAddress, 1); |
1298 | return 0; | 1298 | return 0; |
1299 | } | 1299 | } |
1300 | 1300 | ||
1301 | /****************************************************************************/ | 1301 | /****************************************************************************/ |
1302 | static int process_gcf(struct sk_buff **pskb, struct nf_conn *ct, | 1302 | static int process_gcf(struct sk_buff *skb, struct nf_conn *ct, |
1303 | enum ip_conntrack_info ctinfo, | 1303 | enum ip_conntrack_info ctinfo, |
1304 | unsigned char **data, GatekeeperConfirm *gcf) | 1304 | unsigned char **data, GatekeeperConfirm *gcf) |
1305 | { | 1305 | { |
@@ -1343,7 +1343,7 @@ static int process_gcf(struct sk_buff **pskb, struct nf_conn *ct, | |||
1343 | } | 1343 | } |
1344 | 1344 | ||
1345 | /****************************************************************************/ | 1345 | /****************************************************************************/ |
1346 | static int process_rrq(struct sk_buff **pskb, struct nf_conn *ct, | 1346 | static int process_rrq(struct sk_buff *skb, struct nf_conn *ct, |
1347 | enum ip_conntrack_info ctinfo, | 1347 | enum ip_conntrack_info ctinfo, |
1348 | unsigned char **data, RegistrationRequest *rrq) | 1348 | unsigned char **data, RegistrationRequest *rrq) |
1349 | { | 1349 | { |
@@ -1353,7 +1353,7 @@ static int process_rrq(struct sk_buff **pskb, struct nf_conn *ct, | |||
1353 | 1353 | ||
1354 | pr_debug("nf_ct_ras: RRQ\n"); | 1354 | pr_debug("nf_ct_ras: RRQ\n"); |
1355 | 1355 | ||
1356 | ret = expect_q931(pskb, ct, ctinfo, data, | 1356 | ret = expect_q931(skb, ct, ctinfo, data, |
1357 | rrq->callSignalAddress.item, | 1357 | rrq->callSignalAddress.item, |
1358 | rrq->callSignalAddress.count); | 1358 | rrq->callSignalAddress.count); |
1359 | if (ret < 0) | 1359 | if (ret < 0) |
@@ -1361,7 +1361,7 @@ static int process_rrq(struct sk_buff **pskb, struct nf_conn *ct, | |||
1361 | 1361 | ||
1362 | set_ras_addr = rcu_dereference(set_ras_addr_hook); | 1362 | set_ras_addr = rcu_dereference(set_ras_addr_hook); |
1363 | if (set_ras_addr && ct->status & IPS_NAT_MASK) { | 1363 | if (set_ras_addr && ct->status & IPS_NAT_MASK) { |
1364 | ret = set_ras_addr(pskb, ct, ctinfo, data, | 1364 | ret = set_ras_addr(skb, ct, ctinfo, data, |
1365 | rrq->rasAddress.item, | 1365 | rrq->rasAddress.item, |
1366 | rrq->rasAddress.count); | 1366 | rrq->rasAddress.count); |
1367 | if (ret < 0) | 1367 | if (ret < 0) |
@@ -1378,7 +1378,7 @@ static int process_rrq(struct sk_buff **pskb, struct nf_conn *ct, | |||
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | /****************************************************************************/ | 1380 | /****************************************************************************/ |
1381 | static int process_rcf(struct sk_buff **pskb, struct nf_conn *ct, | 1381 | static int process_rcf(struct sk_buff *skb, struct nf_conn *ct, |
1382 | enum ip_conntrack_info ctinfo, | 1382 | enum ip_conntrack_info ctinfo, |
1383 | unsigned char **data, RegistrationConfirm *rcf) | 1383 | unsigned char **data, RegistrationConfirm *rcf) |
1384 | { | 1384 | { |
@@ -1392,7 +1392,7 @@ static int process_rcf(struct sk_buff **pskb, struct nf_conn *ct, | |||
1392 | 1392 | ||
1393 | set_sig_addr = rcu_dereference(set_sig_addr_hook); | 1393 | set_sig_addr = rcu_dereference(set_sig_addr_hook); |
1394 | if (set_sig_addr && ct->status & IPS_NAT_MASK) { | 1394 | if (set_sig_addr && ct->status & IPS_NAT_MASK) { |
1395 | ret = set_sig_addr(pskb, ct, ctinfo, data, | 1395 | ret = set_sig_addr(skb, ct, ctinfo, data, |
1396 | rcf->callSignalAddress.item, | 1396 | rcf->callSignalAddress.item, |
1397 | rcf->callSignalAddress.count); | 1397 | rcf->callSignalAddress.count); |
1398 | if (ret < 0) | 1398 | if (ret < 0) |
@@ -1407,7 +1407,7 @@ static int process_rcf(struct sk_buff **pskb, struct nf_conn *ct, | |||
1407 | if (info->timeout > 0) { | 1407 | if (info->timeout > 0) { |
1408 | pr_debug("nf_ct_ras: set RAS connection timeout to " | 1408 | pr_debug("nf_ct_ras: set RAS connection timeout to " |
1409 | "%u seconds\n", info->timeout); | 1409 | "%u seconds\n", info->timeout); |
1410 | nf_ct_refresh(ct, *pskb, info->timeout * HZ); | 1410 | nf_ct_refresh(ct, skb, info->timeout * HZ); |
1411 | 1411 | ||
1412 | /* Set expect timeout */ | 1412 | /* Set expect timeout */ |
1413 | read_lock_bh(&nf_conntrack_lock); | 1413 | read_lock_bh(&nf_conntrack_lock); |
@@ -1427,7 +1427,7 @@ static int process_rcf(struct sk_buff **pskb, struct nf_conn *ct, | |||
1427 | } | 1427 | } |
1428 | 1428 | ||
1429 | /****************************************************************************/ | 1429 | /****************************************************************************/ |
1430 | static int process_urq(struct sk_buff **pskb, struct nf_conn *ct, | 1430 | static int process_urq(struct sk_buff *skb, struct nf_conn *ct, |
1431 | enum ip_conntrack_info ctinfo, | 1431 | enum ip_conntrack_info ctinfo, |
1432 | unsigned char **data, UnregistrationRequest *urq) | 1432 | unsigned char **data, UnregistrationRequest *urq) |
1433 | { | 1433 | { |
@@ -1440,7 +1440,7 @@ static int process_urq(struct sk_buff **pskb, struct nf_conn *ct, | |||
1440 | 1440 | ||
1441 | set_sig_addr = rcu_dereference(set_sig_addr_hook); | 1441 | set_sig_addr = rcu_dereference(set_sig_addr_hook); |
1442 | if (set_sig_addr && ct->status & IPS_NAT_MASK) { | 1442 | if (set_sig_addr && ct->status & IPS_NAT_MASK) { |
1443 | ret = set_sig_addr(pskb, ct, ctinfo, data, | 1443 | ret = set_sig_addr(skb, ct, ctinfo, data, |
1444 | urq->callSignalAddress.item, | 1444 | urq->callSignalAddress.item, |
1445 | urq->callSignalAddress.count); | 1445 | urq->callSignalAddress.count); |
1446 | if (ret < 0) | 1446 | if (ret < 0) |
@@ -1453,13 +1453,13 @@ static int process_urq(struct sk_buff **pskb, struct nf_conn *ct, | |||
1453 | info->sig_port[!dir] = 0; | 1453 | info->sig_port[!dir] = 0; |
1454 | 1454 | ||
1455 | /* Give it 30 seconds for UCF or URJ */ | 1455 | /* Give it 30 seconds for UCF or URJ */ |
1456 | nf_ct_refresh(ct, *pskb, 30 * HZ); | 1456 | nf_ct_refresh(ct, skb, 30 * HZ); |
1457 | 1457 | ||
1458 | return 0; | 1458 | return 0; |
1459 | } | 1459 | } |
1460 | 1460 | ||
1461 | /****************************************************************************/ | 1461 | /****************************************************************************/ |
1462 | static int process_arq(struct sk_buff **pskb, struct nf_conn *ct, | 1462 | static int process_arq(struct sk_buff *skb, struct nf_conn *ct, |
1463 | enum ip_conntrack_info ctinfo, | 1463 | enum ip_conntrack_info ctinfo, |
1464 | unsigned char **data, AdmissionRequest *arq) | 1464 | unsigned char **data, AdmissionRequest *arq) |
1465 | { | 1465 | { |
@@ -1479,7 +1479,7 @@ static int process_arq(struct sk_buff **pskb, struct nf_conn *ct, | |||
1479 | port == info->sig_port[dir] && | 1479 | port == info->sig_port[dir] && |
1480 | set_h225_addr && ct->status & IPS_NAT_MASK) { | 1480 | set_h225_addr && ct->status & IPS_NAT_MASK) { |
1481 | /* Answering ARQ */ | 1481 | /* Answering ARQ */ |
1482 | return set_h225_addr(pskb, data, 0, | 1482 | return set_h225_addr(skb, data, 0, |
1483 | &arq->destCallSignalAddress, | 1483 | &arq->destCallSignalAddress, |
1484 | &ct->tuplehash[!dir].tuple.dst.u3, | 1484 | &ct->tuplehash[!dir].tuple.dst.u3, |
1485 | info->sig_port[!dir]); | 1485 | info->sig_port[!dir]); |
@@ -1491,7 +1491,7 @@ static int process_arq(struct sk_buff **pskb, struct nf_conn *ct, | |||
1491 | !memcmp(&addr, &ct->tuplehash[dir].tuple.src.u3, sizeof(addr)) && | 1491 | !memcmp(&addr, &ct->tuplehash[dir].tuple.src.u3, sizeof(addr)) && |
1492 | set_h225_addr && ct->status & IPS_NAT_MASK) { | 1492 | set_h225_addr && ct->status & IPS_NAT_MASK) { |
1493 | /* Calling ARQ */ | 1493 | /* Calling ARQ */ |
1494 | return set_h225_addr(pskb, data, 0, | 1494 | return set_h225_addr(skb, data, 0, |
1495 | &arq->srcCallSignalAddress, | 1495 | &arq->srcCallSignalAddress, |
1496 | &ct->tuplehash[!dir].tuple.dst.u3, | 1496 | &ct->tuplehash[!dir].tuple.dst.u3, |
1497 | port); | 1497 | port); |
@@ -1501,7 +1501,7 @@ static int process_arq(struct sk_buff **pskb, struct nf_conn *ct, | |||
1501 | } | 1501 | } |
1502 | 1502 | ||
1503 | /****************************************************************************/ | 1503 | /****************************************************************************/ |
1504 | static int process_acf(struct sk_buff **pskb, struct nf_conn *ct, | 1504 | static int process_acf(struct sk_buff *skb, struct nf_conn *ct, |
1505 | enum ip_conntrack_info ctinfo, | 1505 | enum ip_conntrack_info ctinfo, |
1506 | unsigned char **data, AdmissionConfirm *acf) | 1506 | unsigned char **data, AdmissionConfirm *acf) |
1507 | { | 1507 | { |
@@ -1522,7 +1522,7 @@ static int process_acf(struct sk_buff **pskb, struct nf_conn *ct, | |||
1522 | /* Answering ACF */ | 1522 | /* Answering ACF */ |
1523 | set_sig_addr = rcu_dereference(set_sig_addr_hook); | 1523 | set_sig_addr = rcu_dereference(set_sig_addr_hook); |
1524 | if (set_sig_addr && ct->status & IPS_NAT_MASK) | 1524 | if (set_sig_addr && ct->status & IPS_NAT_MASK) |
1525 | return set_sig_addr(pskb, ct, ctinfo, data, | 1525 | return set_sig_addr(skb, ct, ctinfo, data, |
1526 | &acf->destCallSignalAddress, 1); | 1526 | &acf->destCallSignalAddress, 1); |
1527 | return 0; | 1527 | return 0; |
1528 | } | 1528 | } |
@@ -1548,7 +1548,7 @@ static int process_acf(struct sk_buff **pskb, struct nf_conn *ct, | |||
1548 | } | 1548 | } |
1549 | 1549 | ||
1550 | /****************************************************************************/ | 1550 | /****************************************************************************/ |
1551 | static int process_lrq(struct sk_buff **pskb, struct nf_conn *ct, | 1551 | static int process_lrq(struct sk_buff *skb, struct nf_conn *ct, |
1552 | enum ip_conntrack_info ctinfo, | 1552 | enum ip_conntrack_info ctinfo, |
1553 | unsigned char **data, LocationRequest *lrq) | 1553 | unsigned char **data, LocationRequest *lrq) |
1554 | { | 1554 | { |
@@ -1558,13 +1558,13 @@ static int process_lrq(struct sk_buff **pskb, struct nf_conn *ct, | |||
1558 | 1558 | ||
1559 | set_ras_addr = rcu_dereference(set_ras_addr_hook); | 1559 | set_ras_addr = rcu_dereference(set_ras_addr_hook); |
1560 | if (set_ras_addr && ct->status & IPS_NAT_MASK) | 1560 | if (set_ras_addr && ct->status & IPS_NAT_MASK) |
1561 | return set_ras_addr(pskb, ct, ctinfo, data, | 1561 | return set_ras_addr(skb, ct, ctinfo, data, |
1562 | &lrq->replyAddress, 1); | 1562 | &lrq->replyAddress, 1); |
1563 | return 0; | 1563 | return 0; |
1564 | } | 1564 | } |
1565 | 1565 | ||
1566 | /****************************************************************************/ | 1566 | /****************************************************************************/ |
1567 | static int process_lcf(struct sk_buff **pskb, struct nf_conn *ct, | 1567 | static int process_lcf(struct sk_buff *skb, struct nf_conn *ct, |
1568 | enum ip_conntrack_info ctinfo, | 1568 | enum ip_conntrack_info ctinfo, |
1569 | unsigned char **data, LocationConfirm *lcf) | 1569 | unsigned char **data, LocationConfirm *lcf) |
1570 | { | 1570 | { |
@@ -1603,7 +1603,7 @@ static int process_lcf(struct sk_buff **pskb, struct nf_conn *ct, | |||
1603 | } | 1603 | } |
1604 | 1604 | ||
1605 | /****************************************************************************/ | 1605 | /****************************************************************************/ |
1606 | static int process_irr(struct sk_buff **pskb, struct nf_conn *ct, | 1606 | static int process_irr(struct sk_buff *skb, struct nf_conn *ct, |
1607 | enum ip_conntrack_info ctinfo, | 1607 | enum ip_conntrack_info ctinfo, |
1608 | unsigned char **data, InfoRequestResponse *irr) | 1608 | unsigned char **data, InfoRequestResponse *irr) |
1609 | { | 1609 | { |
@@ -1615,7 +1615,7 @@ static int process_irr(struct sk_buff **pskb, struct nf_conn *ct, | |||
1615 | 1615 | ||
1616 | set_ras_addr = rcu_dereference(set_ras_addr_hook); | 1616 | set_ras_addr = rcu_dereference(set_ras_addr_hook); |
1617 | if (set_ras_addr && ct->status & IPS_NAT_MASK) { | 1617 | if (set_ras_addr && ct->status & IPS_NAT_MASK) { |
1618 | ret = set_ras_addr(pskb, ct, ctinfo, data, | 1618 | ret = set_ras_addr(skb, ct, ctinfo, data, |
1619 | &irr->rasAddress, 1); | 1619 | &irr->rasAddress, 1); |
1620 | if (ret < 0) | 1620 | if (ret < 0) |
1621 | return -1; | 1621 | return -1; |
@@ -1623,7 +1623,7 @@ static int process_irr(struct sk_buff **pskb, struct nf_conn *ct, | |||
1623 | 1623 | ||
1624 | set_sig_addr = rcu_dereference(set_sig_addr_hook); | 1624 | set_sig_addr = rcu_dereference(set_sig_addr_hook); |
1625 | if (set_sig_addr && ct->status & IPS_NAT_MASK) { | 1625 | if (set_sig_addr && ct->status & IPS_NAT_MASK) { |
1626 | ret = set_sig_addr(pskb, ct, ctinfo, data, | 1626 | ret = set_sig_addr(skb, ct, ctinfo, data, |
1627 | irr->callSignalAddress.item, | 1627 | irr->callSignalAddress.item, |
1628 | irr->callSignalAddress.count); | 1628 | irr->callSignalAddress.count); |
1629 | if (ret < 0) | 1629 | if (ret < 0) |
@@ -1634,40 +1634,40 @@ static int process_irr(struct sk_buff **pskb, struct nf_conn *ct, | |||
1634 | } | 1634 | } |
1635 | 1635 | ||
1636 | /****************************************************************************/ | 1636 | /****************************************************************************/ |
1637 | static int process_ras(struct sk_buff **pskb, struct nf_conn *ct, | 1637 | static int process_ras(struct sk_buff *skb, struct nf_conn *ct, |
1638 | enum ip_conntrack_info ctinfo, | 1638 | enum ip_conntrack_info ctinfo, |
1639 | unsigned char **data, RasMessage *ras) | 1639 | unsigned char **data, RasMessage *ras) |
1640 | { | 1640 | { |
1641 | switch (ras->choice) { | 1641 | switch (ras->choice) { |
1642 | case eRasMessage_gatekeeperRequest: | 1642 | case eRasMessage_gatekeeperRequest: |
1643 | return process_grq(pskb, ct, ctinfo, data, | 1643 | return process_grq(skb, ct, ctinfo, data, |
1644 | &ras->gatekeeperRequest); | 1644 | &ras->gatekeeperRequest); |
1645 | case eRasMessage_gatekeeperConfirm: | 1645 | case eRasMessage_gatekeeperConfirm: |
1646 | return process_gcf(pskb, ct, ctinfo, data, | 1646 | return process_gcf(skb, ct, ctinfo, data, |
1647 | &ras->gatekeeperConfirm); | 1647 | &ras->gatekeeperConfirm); |
1648 | case eRasMessage_registrationRequest: | 1648 | case eRasMessage_registrationRequest: |
1649 | return process_rrq(pskb, ct, ctinfo, data, | 1649 | return process_rrq(skb, ct, ctinfo, data, |
1650 | &ras->registrationRequest); | 1650 | &ras->registrationRequest); |
1651 | case eRasMessage_registrationConfirm: | 1651 | case eRasMessage_registrationConfirm: |
1652 | return process_rcf(pskb, ct, ctinfo, data, | 1652 | return process_rcf(skb, ct, ctinfo, data, |
1653 | &ras->registrationConfirm); | 1653 | &ras->registrationConfirm); |
1654 | case eRasMessage_unregistrationRequest: | 1654 | case eRasMessage_unregistrationRequest: |
1655 | return process_urq(pskb, ct, ctinfo, data, | 1655 | return process_urq(skb, ct, ctinfo, data, |
1656 | &ras->unregistrationRequest); | 1656 | &ras->unregistrationRequest); |
1657 | case eRasMessage_admissionRequest: | 1657 | case eRasMessage_admissionRequest: |
1658 | return process_arq(pskb, ct, ctinfo, data, | 1658 | return process_arq(skb, ct, ctinfo, data, |
1659 | &ras->admissionRequest); | 1659 | &ras->admissionRequest); |
1660 | case eRasMessage_admissionConfirm: | 1660 | case eRasMessage_admissionConfirm: |
1661 | return process_acf(pskb, ct, ctinfo, data, | 1661 | return process_acf(skb, ct, ctinfo, data, |
1662 | &ras->admissionConfirm); | 1662 | &ras->admissionConfirm); |
1663 | case eRasMessage_locationRequest: | 1663 | case eRasMessage_locationRequest: |
1664 | return process_lrq(pskb, ct, ctinfo, data, | 1664 | return process_lrq(skb, ct, ctinfo, data, |
1665 | &ras->locationRequest); | 1665 | &ras->locationRequest); |
1666 | case eRasMessage_locationConfirm: | 1666 | case eRasMessage_locationConfirm: |
1667 | return process_lcf(pskb, ct, ctinfo, data, | 1667 | return process_lcf(skb, ct, ctinfo, data, |
1668 | &ras->locationConfirm); | 1668 | &ras->locationConfirm); |
1669 | case eRasMessage_infoRequestResponse: | 1669 | case eRasMessage_infoRequestResponse: |
1670 | return process_irr(pskb, ct, ctinfo, data, | 1670 | return process_irr(skb, ct, ctinfo, data, |
1671 | &ras->infoRequestResponse); | 1671 | &ras->infoRequestResponse); |
1672 | default: | 1672 | default: |
1673 | pr_debug("nf_ct_ras: RAS message %d\n", ras->choice); | 1673 | pr_debug("nf_ct_ras: RAS message %d\n", ras->choice); |
@@ -1678,7 +1678,7 @@ static int process_ras(struct sk_buff **pskb, struct nf_conn *ct, | |||
1678 | } | 1678 | } |
1679 | 1679 | ||
1680 | /****************************************************************************/ | 1680 | /****************************************************************************/ |
1681 | static int ras_help(struct sk_buff **pskb, unsigned int protoff, | 1681 | static int ras_help(struct sk_buff *skb, unsigned int protoff, |
1682 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) | 1682 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) |
1683 | { | 1683 | { |
1684 | static RasMessage ras; | 1684 | static RasMessage ras; |
@@ -1686,12 +1686,12 @@ static int ras_help(struct sk_buff **pskb, unsigned int protoff, | |||
1686 | int datalen = 0; | 1686 | int datalen = 0; |
1687 | int ret; | 1687 | int ret; |
1688 | 1688 | ||
1689 | pr_debug("nf_ct_ras: skblen = %u\n", (*pskb)->len); | 1689 | pr_debug("nf_ct_ras: skblen = %u\n", skb->len); |
1690 | 1690 | ||
1691 | spin_lock_bh(&nf_h323_lock); | 1691 | spin_lock_bh(&nf_h323_lock); |
1692 | 1692 | ||
1693 | /* Get UDP data */ | 1693 | /* Get UDP data */ |
1694 | data = get_udp_data(pskb, protoff, &datalen); | 1694 | data = get_udp_data(skb, protoff, &datalen); |
1695 | if (data == NULL) | 1695 | if (data == NULL) |
1696 | goto accept; | 1696 | goto accept; |
1697 | pr_debug("nf_ct_ras: RAS message len=%d ", datalen); | 1697 | pr_debug("nf_ct_ras: RAS message len=%d ", datalen); |
@@ -1707,7 +1707,7 @@ static int ras_help(struct sk_buff **pskb, unsigned int protoff, | |||
1707 | } | 1707 | } |
1708 | 1708 | ||
1709 | /* Process RAS message */ | 1709 | /* Process RAS message */ |
1710 | if (process_ras(pskb, ct, ctinfo, &data, &ras) < 0) | 1710 | if (process_ras(skb, ct, ctinfo, &data, &ras) < 0) |
1711 | goto drop; | 1711 | goto drop; |
1712 | 1712 | ||
1713 | accept: | 1713 | accept: |
diff --git a/net/netfilter/nf_conntrack_irc.c b/net/netfilter/nf_conntrack_irc.c index 1562ca97a349..dfaed4ba83cd 100644 --- a/net/netfilter/nf_conntrack_irc.c +++ b/net/netfilter/nf_conntrack_irc.c | |||
@@ -30,7 +30,7 @@ static unsigned int dcc_timeout __read_mostly = 300; | |||
30 | static char *irc_buffer; | 30 | static char *irc_buffer; |
31 | static DEFINE_SPINLOCK(irc_buffer_lock); | 31 | static DEFINE_SPINLOCK(irc_buffer_lock); |
32 | 32 | ||
33 | unsigned int (*nf_nat_irc_hook)(struct sk_buff **pskb, | 33 | unsigned int (*nf_nat_irc_hook)(struct sk_buff *skb, |
34 | enum ip_conntrack_info ctinfo, | 34 | enum ip_conntrack_info ctinfo, |
35 | unsigned int matchoff, | 35 | unsigned int matchoff, |
36 | unsigned int matchlen, | 36 | unsigned int matchlen, |
@@ -89,7 +89,7 @@ static int parse_dcc(char *data, char *data_end, u_int32_t *ip, | |||
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | 91 | ||
92 | static int help(struct sk_buff **pskb, unsigned int protoff, | 92 | static int help(struct sk_buff *skb, unsigned int protoff, |
93 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) | 93 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) |
94 | { | 94 | { |
95 | unsigned int dataoff; | 95 | unsigned int dataoff; |
@@ -116,22 +116,22 @@ static int help(struct sk_buff **pskb, unsigned int protoff, | |||
116 | return NF_ACCEPT; | 116 | return NF_ACCEPT; |
117 | 117 | ||
118 | /* Not a full tcp header? */ | 118 | /* Not a full tcp header? */ |
119 | th = skb_header_pointer(*pskb, protoff, sizeof(_tcph), &_tcph); | 119 | th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); |
120 | if (th == NULL) | 120 | if (th == NULL) |
121 | return NF_ACCEPT; | 121 | return NF_ACCEPT; |
122 | 122 | ||
123 | /* No data? */ | 123 | /* No data? */ |
124 | dataoff = protoff + th->doff*4; | 124 | dataoff = protoff + th->doff*4; |
125 | if (dataoff >= (*pskb)->len) | 125 | if (dataoff >= skb->len) |
126 | return NF_ACCEPT; | 126 | return NF_ACCEPT; |
127 | 127 | ||
128 | spin_lock_bh(&irc_buffer_lock); | 128 | spin_lock_bh(&irc_buffer_lock); |
129 | ib_ptr = skb_header_pointer(*pskb, dataoff, (*pskb)->len - dataoff, | 129 | ib_ptr = skb_header_pointer(skb, dataoff, skb->len - dataoff, |
130 | irc_buffer); | 130 | irc_buffer); |
131 | BUG_ON(ib_ptr == NULL); | 131 | BUG_ON(ib_ptr == NULL); |
132 | 132 | ||
133 | data = ib_ptr; | 133 | data = ib_ptr; |
134 | data_limit = ib_ptr + (*pskb)->len - dataoff; | 134 | data_limit = ib_ptr + skb->len - dataoff; |
135 | 135 | ||
136 | /* strlen("\1DCC SENT t AAAAAAAA P\1\n")=24 | 136 | /* strlen("\1DCC SENT t AAAAAAAA P\1\n")=24 |
137 | * 5+MINMATCHLEN+strlen("t AAAAAAAA P\1\n")=14 */ | 137 | * 5+MINMATCHLEN+strlen("t AAAAAAAA P\1\n")=14 */ |
@@ -143,7 +143,7 @@ static int help(struct sk_buff **pskb, unsigned int protoff, | |||
143 | data += 5; | 143 | data += 5; |
144 | /* we have at least (19+MINMATCHLEN)-5 bytes valid data left */ | 144 | /* we have at least (19+MINMATCHLEN)-5 bytes valid data left */ |
145 | 145 | ||
146 | iph = ip_hdr(*pskb); | 146 | iph = ip_hdr(skb); |
147 | pr_debug("DCC found in master %u.%u.%u.%u:%u %u.%u.%u.%u:%u\n", | 147 | pr_debug("DCC found in master %u.%u.%u.%u:%u %u.%u.%u.%u:%u\n", |
148 | NIPQUAD(iph->saddr), ntohs(th->source), | 148 | NIPQUAD(iph->saddr), ntohs(th->source), |
149 | NIPQUAD(iph->daddr), ntohs(th->dest)); | 149 | NIPQUAD(iph->daddr), ntohs(th->dest)); |
@@ -193,7 +193,7 @@ static int help(struct sk_buff **pskb, unsigned int protoff, | |||
193 | 193 | ||
194 | nf_nat_irc = rcu_dereference(nf_nat_irc_hook); | 194 | nf_nat_irc = rcu_dereference(nf_nat_irc_hook); |
195 | if (nf_nat_irc && ct->status & IPS_NAT_MASK) | 195 | if (nf_nat_irc && ct->status & IPS_NAT_MASK) |
196 | ret = nf_nat_irc(pskb, ctinfo, | 196 | ret = nf_nat_irc(skb, ctinfo, |
197 | addr_beg_p - ib_ptr, | 197 | addr_beg_p - ib_ptr, |
198 | addr_end_p - addr_beg_p, | 198 | addr_end_p - addr_beg_p, |
199 | exp); | 199 | exp); |
diff --git a/net/netfilter/nf_conntrack_netbios_ns.c b/net/netfilter/nf_conntrack_netbios_ns.c index 1d59fabeb5f7..9810d81e2a06 100644 --- a/net/netfilter/nf_conntrack_netbios_ns.c +++ b/net/netfilter/nf_conntrack_netbios_ns.c | |||
@@ -42,17 +42,17 @@ static unsigned int timeout __read_mostly = 3; | |||
42 | module_param(timeout, uint, 0400); | 42 | module_param(timeout, uint, 0400); |
43 | MODULE_PARM_DESC(timeout, "timeout for master connection/replies in seconds"); | 43 | MODULE_PARM_DESC(timeout, "timeout for master connection/replies in seconds"); |
44 | 44 | ||
45 | static int help(struct sk_buff **pskb, unsigned int protoff, | 45 | static int help(struct sk_buff *skb, unsigned int protoff, |
46 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) | 46 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) |
47 | { | 47 | { |
48 | struct nf_conntrack_expect *exp; | 48 | struct nf_conntrack_expect *exp; |
49 | struct iphdr *iph = ip_hdr(*pskb); | 49 | struct iphdr *iph = ip_hdr(skb); |
50 | struct rtable *rt = (struct rtable *)(*pskb)->dst; | 50 | struct rtable *rt = (struct rtable *)skb->dst; |
51 | struct in_device *in_dev; | 51 | struct in_device *in_dev; |
52 | __be32 mask = 0; | 52 | __be32 mask = 0; |
53 | 53 | ||
54 | /* we're only interested in locally generated packets */ | 54 | /* we're only interested in locally generated packets */ |
55 | if ((*pskb)->sk == NULL) | 55 | if (skb->sk == NULL) |
56 | goto out; | 56 | goto out; |
57 | if (rt == NULL || !(rt->rt_flags & RTCF_BROADCAST)) | 57 | if (rt == NULL || !(rt->rt_flags & RTCF_BROADCAST)) |
58 | goto out; | 58 | goto out; |
@@ -91,7 +91,7 @@ static int help(struct sk_buff **pskb, unsigned int protoff, | |||
91 | nf_ct_expect_related(exp); | 91 | nf_ct_expect_related(exp); |
92 | nf_ct_expect_put(exp); | 92 | nf_ct_expect_put(exp); |
93 | 93 | ||
94 | nf_ct_refresh(ct, *pskb, timeout * HZ); | 94 | nf_ct_refresh(ct, skb, timeout * HZ); |
95 | out: | 95 | out: |
96 | return NF_ACCEPT; | 96 | return NF_ACCEPT; |
97 | } | 97 | } |
diff --git a/net/netfilter/nf_conntrack_pptp.c b/net/netfilter/nf_conntrack_pptp.c index b0804199ab59..099b6df3e2b5 100644 --- a/net/netfilter/nf_conntrack_pptp.c +++ b/net/netfilter/nf_conntrack_pptp.c | |||
@@ -41,14 +41,14 @@ MODULE_ALIAS("ip_conntrack_pptp"); | |||
41 | static DEFINE_SPINLOCK(nf_pptp_lock); | 41 | static DEFINE_SPINLOCK(nf_pptp_lock); |
42 | 42 | ||
43 | int | 43 | int |
44 | (*nf_nat_pptp_hook_outbound)(struct sk_buff **pskb, | 44 | (*nf_nat_pptp_hook_outbound)(struct sk_buff *skb, |
45 | struct nf_conn *ct, enum ip_conntrack_info ctinfo, | 45 | struct nf_conn *ct, enum ip_conntrack_info ctinfo, |
46 | struct PptpControlHeader *ctlh, | 46 | struct PptpControlHeader *ctlh, |
47 | union pptp_ctrl_union *pptpReq) __read_mostly; | 47 | union pptp_ctrl_union *pptpReq) __read_mostly; |
48 | EXPORT_SYMBOL_GPL(nf_nat_pptp_hook_outbound); | 48 | EXPORT_SYMBOL_GPL(nf_nat_pptp_hook_outbound); |
49 | 49 | ||
50 | int | 50 | int |
51 | (*nf_nat_pptp_hook_inbound)(struct sk_buff **pskb, | 51 | (*nf_nat_pptp_hook_inbound)(struct sk_buff *skb, |
52 | struct nf_conn *ct, enum ip_conntrack_info ctinfo, | 52 | struct nf_conn *ct, enum ip_conntrack_info ctinfo, |
53 | struct PptpControlHeader *ctlh, | 53 | struct PptpControlHeader *ctlh, |
54 | union pptp_ctrl_union *pptpReq) __read_mostly; | 54 | union pptp_ctrl_union *pptpReq) __read_mostly; |
@@ -254,7 +254,7 @@ out_unexpect_orig: | |||
254 | } | 254 | } |
255 | 255 | ||
256 | static inline int | 256 | static inline int |
257 | pptp_inbound_pkt(struct sk_buff **pskb, | 257 | pptp_inbound_pkt(struct sk_buff *skb, |
258 | struct PptpControlHeader *ctlh, | 258 | struct PptpControlHeader *ctlh, |
259 | union pptp_ctrl_union *pptpReq, | 259 | union pptp_ctrl_union *pptpReq, |
260 | unsigned int reqlen, | 260 | unsigned int reqlen, |
@@ -367,7 +367,7 @@ pptp_inbound_pkt(struct sk_buff **pskb, | |||
367 | 367 | ||
368 | nf_nat_pptp_inbound = rcu_dereference(nf_nat_pptp_hook_inbound); | 368 | nf_nat_pptp_inbound = rcu_dereference(nf_nat_pptp_hook_inbound); |
369 | if (nf_nat_pptp_inbound && ct->status & IPS_NAT_MASK) | 369 | if (nf_nat_pptp_inbound && ct->status & IPS_NAT_MASK) |
370 | return nf_nat_pptp_inbound(pskb, ct, ctinfo, ctlh, pptpReq); | 370 | return nf_nat_pptp_inbound(skb, ct, ctinfo, ctlh, pptpReq); |
371 | return NF_ACCEPT; | 371 | return NF_ACCEPT; |
372 | 372 | ||
373 | invalid: | 373 | invalid: |
@@ -380,7 +380,7 @@ invalid: | |||
380 | } | 380 | } |
381 | 381 | ||
382 | static inline int | 382 | static inline int |
383 | pptp_outbound_pkt(struct sk_buff **pskb, | 383 | pptp_outbound_pkt(struct sk_buff *skb, |
384 | struct PptpControlHeader *ctlh, | 384 | struct PptpControlHeader *ctlh, |
385 | union pptp_ctrl_union *pptpReq, | 385 | union pptp_ctrl_union *pptpReq, |
386 | unsigned int reqlen, | 386 | unsigned int reqlen, |
@@ -462,7 +462,7 @@ pptp_outbound_pkt(struct sk_buff **pskb, | |||
462 | 462 | ||
463 | nf_nat_pptp_outbound = rcu_dereference(nf_nat_pptp_hook_outbound); | 463 | nf_nat_pptp_outbound = rcu_dereference(nf_nat_pptp_hook_outbound); |
464 | if (nf_nat_pptp_outbound && ct->status & IPS_NAT_MASK) | 464 | if (nf_nat_pptp_outbound && ct->status & IPS_NAT_MASK) |
465 | return nf_nat_pptp_outbound(pskb, ct, ctinfo, ctlh, pptpReq); | 465 | return nf_nat_pptp_outbound(skb, ct, ctinfo, ctlh, pptpReq); |
466 | return NF_ACCEPT; | 466 | return NF_ACCEPT; |
467 | 467 | ||
468 | invalid: | 468 | invalid: |
@@ -492,7 +492,7 @@ static const unsigned int pptp_msg_size[] = { | |||
492 | 492 | ||
493 | /* track caller id inside control connection, call expect_related */ | 493 | /* track caller id inside control connection, call expect_related */ |
494 | static int | 494 | static int |
495 | conntrack_pptp_help(struct sk_buff **pskb, unsigned int protoff, | 495 | conntrack_pptp_help(struct sk_buff *skb, unsigned int protoff, |
496 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) | 496 | struct nf_conn *ct, enum ip_conntrack_info ctinfo) |
497 | 497 | ||
498 | { | 498 | { |
@@ -502,7 +502,7 @@ conntrack_pptp_help(struct sk_buff **pskb, unsigned int protoff, | |||
502 | struct pptp_pkt_hdr _pptph, *pptph; | 502 | struct pptp_pkt_hdr _pptph, *pptph; |
503 | struct PptpControlHeader _ctlh, *ctlh; | 503 | struct PptpControlHeader _ctlh, *ctlh; |
504 | union pptp_ctrl_union _pptpReq, *pptpReq; | 504 | union pptp_ctrl_union _pptpReq, *pptpReq; |
505 | unsigned int tcplen = (*pskb)->len - protoff; | 505 | unsigned int tcplen = skb->len - protoff; |
506 | unsigned int datalen, reqlen, nexthdr_off; | 506 | unsigned int datalen, reqlen, nexthdr_off; |
507 | int oldsstate, oldcstate; | 507 | int oldsstate, oldcstate; |
508 | int ret; | 508 | int ret; |
@@ -514,12 +514,12 @@ conntrack_pptp_help(struct sk_buff **pskb, unsigned int protoff, | |||
514 | return NF_ACCEPT; | 514 | return NF_ACCEPT; |
515 | 515 | ||
516 | nexthdr_off = protoff; | 516 | nexthdr_off = protoff; |
517 | tcph = skb_header_pointer(*pskb, nexthdr_off, sizeof(_tcph), &_tcph); | 517 | tcph = skb_header_pointer(skb, nexthdr_off, sizeof(_tcph), &_tcph); |
518 | BUG_ON(!tcph); | 518 | BUG_ON(!tcph); |
519 | nexthdr_off += tcph->doff * 4; | 519 | nexthdr_off += tcph->doff * 4; |
520 | datalen = tcplen - tcph->doff * 4; | 520 | datalen = tcplen - tcph->doff * 4; |
521 | 521 | ||
522 | pptph = skb_header_pointer(*pskb, nexthdr_off, sizeof(_pptph), &_pptph); | 522 | pptph = skb_header_pointer(skb, nexthdr_off, sizeof(_pptph), &_pptph); |
523 | if (!pptph) { | 523 | if (!pptph) { |
524 | pr_debug("no full PPTP header, can't track\n"); | 524 | pr_debug("no full PPTP header, can't track\n"); |
525 | return NF_ACCEPT; | 525 | return NF_ACCEPT; |
@@ -534,7 +534,7 @@ conntrack_pptp_help(struct sk_buff **pskb, unsigned int protoff, | |||
534 | return NF_ACCEPT; | 534 | return NF_ACCEPT; |
535 | } | 535 | } |
536 | 536 | ||
537 | ctlh = skb_header_pointer(*pskb, nexthdr_off, sizeof(_ctlh), &_ctlh); | 537 | ctlh = skb_header_pointer(skb, nexthdr_off, sizeof(_ctlh), &_ctlh); |
538 | if (!ctlh) | 538 | if (!ctlh) |
539 | return NF_ACCEPT; | 539 | return NF_ACCEPT; |
540 | nexthdr_off += sizeof(_ctlh); | 540 | nexthdr_off += sizeof(_ctlh); |
@@ -547,7 +547,7 @@ conntrack_pptp_help(struct sk_buff **pskb, unsigned int protoff, | |||
547 | if (reqlen > sizeof(*pptpReq)) | 547 | if (reqlen > sizeof(*pptpReq)) |
548 | reqlen = sizeof(*pptpReq); | 548 | reqlen = sizeof(*pptpReq); |
549 | 549 | ||
550 | pptpReq = skb_header_pointer(*pskb, nexthdr_off, reqlen, &_pptpReq); | 550 | pptpReq = skb_header_pointer(skb, nexthdr_off, reqlen, &_pptpReq); |
551 | if (!pptpReq) | 551 | if (!pptpReq) |
552 | return NF_ACCEPT; | 552 | return NF_ACCEPT; |
553 | 553 | ||
@@ -560,11 +560,11 @@ conntrack_pptp_help(struct sk_buff **pskb, unsigned int protoff, | |||
560 | * established from PNS->PAC. However, RFC makes no guarantee */ | 560 | * established from PNS->PAC. However, RFC makes no guarantee */ |
561 | if (dir == IP_CT_DIR_ORIGINAL) | 561 | if (dir == IP_CT_DIR_ORIGINAL) |
562 | /* client -> server (PNS -> PAC) */ | 562 | /* client -> server (PNS -> PAC) */ |
563 | ret = pptp_outbound_pkt(pskb, ctlh, pptpReq, reqlen, ct, | 563 | ret = pptp_outbound_pkt(skb, ctlh, pptpReq, reqlen, ct, |
564 | ctinfo); | 564 | ctinfo); |
565 | else | 565 | else |
566 | /* server -> client (PAC -> PNS) */ | 566 | /* server -> client (PAC -> PNS) */ |
567 | ret = pptp_inbound_pkt(pskb, ctlh, pptpReq, reqlen, ct, | 567 | ret = pptp_inbound_pkt(skb, ctlh, pptpReq, reqlen, ct, |
568 | ctinfo); | 568 | ctinfo); |
569 | pr_debug("sstate: %d->%d, cstate: %d->%d\n", | 569 | pr_debug("sstate: %d->%d, cstate: %d->%d\n", |
570 | oldsstate, info->sstate, oldcstate, info->cstate); | 570 | oldsstate, info->sstate, oldcstate, info->cstate); |
diff --git a/net/netfilter/nf_conntrack_sane.c b/net/netfilter/nf_conntrack_sane.c index 355d371bac93..b5a16c6e21c2 100644 --- a/net/netfilter/nf_conntrack_sane.c +++ b/net/netfilter/nf_conntrack_sane.c | |||
@@ -56,7 +56,7 @@ struct sane_reply_net_start { | |||
56 | /* other fields aren't interesting for conntrack */ | 56 | /* other fields aren't interesting for conntrack */ |
57 | }; | 57 | }; |
58 | 58 | ||
59 | static int help(struct sk_buff **pskb, | 59 | static int help(struct sk_buff *skb, |
60 | unsigned int protoff, | 60 | unsigned int protoff, |
61 | struct nf_conn *ct, | 61 | struct nf_conn *ct, |
62 | enum ip_conntrack_info ctinfo) | 62 | enum ip_conntrack_info ctinfo) |
@@ -80,19 +80,19 @@ static int help(struct sk_buff **pskb, | |||
80 | return NF_ACCEPT; | 80 | return NF_ACCEPT; |
81 | 81 | ||
82 | /* Not a full tcp header? */ | 82 | /* Not a full tcp header? */ |
83 | th = skb_header_pointer(*pskb, protoff, sizeof(_tcph), &_tcph); | 83 | th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); |
84 | if (th == NULL) | 84 | if (th == NULL) |
85 | return NF_ACCEPT; | 85 | return NF_ACCEPT; |
86 | 86 | ||
87 | /* No data? */ | 87 | /* No data? */ |
88 | dataoff = protoff + th->doff * 4; | 88 | dataoff = protoff + th->doff * 4; |
89 | if (dataoff >= (*pskb)->len) | 89 | if (dataoff >= skb->len) |
90 | return NF_ACCEPT; | 90 | return NF_ACCEPT; |
91 | 91 | ||
92 | datalen = (*pskb)->len - dataoff; | 92 | datalen = skb->len - dataoff; |
93 | 93 | ||
94 | spin_lock_bh(&nf_sane_lock); | 94 | spin_lock_bh(&nf_sane_lock); |
95 | sb_ptr = skb_header_pointer(*pskb, dataoff, datalen, sane_buffer); | 95 | sb_ptr = skb_header_pointer(skb, dataoff, datalen, sane_buffer); |
96 | BUG_ON(sb_ptr == NULL); | 96 | BUG_ON(sb_ptr == NULL); |
97 | 97 | ||
98 | if (dir == IP_CT_DIR_ORIGINAL) { | 98 | if (dir == IP_CT_DIR_ORIGINAL) { |
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index d449fa47491c..8f8b5a48df38 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c | |||
@@ -36,13 +36,13 @@ static unsigned int sip_timeout __read_mostly = SIP_TIMEOUT; | |||
36 | module_param(sip_timeout, uint, 0600); | 36 | module_param(sip_timeout, uint, 0600); |
37 | MODULE_PARM_DESC(sip_timeout, "timeout for the master SIP session"); | 37 | MODULE_PARM_DESC(sip_timeout, "timeout for the master SIP session"); |
38 | 38 | ||
39 | unsigned int (*nf_nat_sip_hook)(struct sk_buff **pskb, | 39 | unsigned int (*nf_nat_sip_hook)(struct sk_buff *skb, |
40 | enum ip_conntrack_info ctinfo, | 40 | enum ip_conntrack_info ctinfo, |
41 | struct nf_conn *ct, | 41 | struct nf_conn *ct, |
42 | const char **dptr) __read_mostly; | 42 | const char **dptr) __read_mostly; |
43 | EXPORT_SYMBOL_GPL(nf_nat_sip_hook); | 43 | EXPORT_SYMBOL_GPL(nf_nat_sip_hook); |
44 | 44 | ||
45 | unsigned int (*nf_nat_sdp_hook)(struct sk_buff **pskb, | 45 | unsigned int (*nf_nat_sdp_hook)(struct sk_buff *skb, |
46 | enum ip_conntrack_info ctinfo, | 46 | enum ip_conntrack_info ctinfo, |
47 | struct nf_conntrack_expect *exp, | 47 | struct nf_conntrack_expect *exp, |
48 | const char *dptr) __read_mostly; | 48 | const char *dptr) __read_mostly; |
@@ -363,7 +363,7 @@ int ct_sip_get_info(struct nf_conn *ct, | |||
363 | } | 363 | } |
364 | EXPORT_SYMBOL_GPL(ct_sip_get_info); | 364 | EXPORT_SYMBOL_GPL(ct_sip_get_info); |
365 | 365 | ||
366 | static int set_expected_rtp(struct sk_buff **pskb, | 366 | static int set_expected_rtp(struct sk_buff *skb, |
367 | struct nf_conn *ct, | 367 | struct nf_conn *ct, |
368 | enum ip_conntrack_info ctinfo, | 368 | enum ip_conntrack_info ctinfo, |
369 | union nf_conntrack_address *addr, | 369 | union nf_conntrack_address *addr, |
@@ -385,7 +385,7 @@ static int set_expected_rtp(struct sk_buff **pskb, | |||
385 | 385 | ||
386 | nf_nat_sdp = rcu_dereference(nf_nat_sdp_hook); | 386 | nf_nat_sdp = rcu_dereference(nf_nat_sdp_hook); |
387 | if (nf_nat_sdp && ct->status & IPS_NAT_MASK) | 387 | if (nf_nat_sdp && ct->status & IPS_NAT_MASK) |
388 | ret = nf_nat_sdp(pskb, ctinfo, exp, dptr); | 388 | ret = nf_nat_sdp(skb, ctinfo, exp, dptr); |
389 | else { | 389 | else { |
390 | if (nf_ct_expect_related(exp) != 0) | 390 | if (nf_ct_expect_related(exp) != 0) |
391 | ret = NF_DROP; | 391 | ret = NF_DROP; |
@@ -397,7 +397,7 @@ static int set_expected_rtp(struct sk_buff **pskb, | |||
397 | return ret; | 397 | return ret; |
398 | } | 398 | } |
399 | 399 | ||
400 | static int sip_help(struct sk_buff **pskb, | 400 | static int sip_help(struct sk_buff *skb, |
401 | unsigned int protoff, | 401 | unsigned int protoff, |
402 | struct nf_conn *ct, | 402 | struct nf_conn *ct, |
403 | enum ip_conntrack_info ctinfo) | 403 | enum ip_conntrack_info ctinfo) |
@@ -414,13 +414,13 @@ static int sip_help(struct sk_buff **pskb, | |||
414 | 414 | ||
415 | /* No Data ? */ | 415 | /* No Data ? */ |
416 | dataoff = protoff + sizeof(struct udphdr); | 416 | dataoff = protoff + sizeof(struct udphdr); |
417 | if (dataoff >= (*pskb)->len) | 417 | if (dataoff >= skb->len) |
418 | return NF_ACCEPT; | 418 | return NF_ACCEPT; |
419 | 419 | ||
420 | nf_ct_refresh(ct, *pskb, sip_timeout * HZ); | 420 | nf_ct_refresh(ct, skb, sip_timeout * HZ); |
421 | 421 | ||
422 | if (!skb_is_nonlinear(*pskb)) | 422 | if (!skb_is_nonlinear(skb)) |
423 | dptr = (*pskb)->data + dataoff; | 423 | dptr = skb->data + dataoff; |
424 | else { | 424 | else { |
425 | pr_debug("Copy of skbuff not supported yet.\n"); | 425 | pr_debug("Copy of skbuff not supported yet.\n"); |
426 | goto out; | 426 | goto out; |
@@ -428,13 +428,13 @@ static int sip_help(struct sk_buff **pskb, | |||
428 | 428 | ||
429 | nf_nat_sip = rcu_dereference(nf_nat_sip_hook); | 429 | nf_nat_sip = rcu_dereference(nf_nat_sip_hook); |
430 | if (nf_nat_sip && ct->status & IPS_NAT_MASK) { | 430 | if (nf_nat_sip && ct->status & IPS_NAT_MASK) { |
431 | if (!nf_nat_sip(pskb, ctinfo, ct, &dptr)) { | 431 | if (!nf_nat_sip(skb, ctinfo, ct, &dptr)) { |
432 | ret = NF_DROP; | 432 | ret = NF_DROP; |
433 | goto out; | 433 | goto out; |
434 | } | 434 | } |
435 | } | 435 | } |
436 | 436 | ||
437 | datalen = (*pskb)->len - dataoff; | 437 | datalen = skb->len - dataoff; |
438 | if (datalen < sizeof("SIP/2.0 200") - 1) | 438 | if (datalen < sizeof("SIP/2.0 200") - 1) |
439 | goto out; | 439 | goto out; |
440 | 440 | ||
@@ -464,7 +464,7 @@ static int sip_help(struct sk_buff **pskb, | |||
464 | ret = NF_DROP; | 464 | ret = NF_DROP; |
465 | goto out; | 465 | goto out; |
466 | } | 466 | } |
467 | ret = set_expected_rtp(pskb, ct, ctinfo, &addr, | 467 | ret = set_expected_rtp(skb, ct, ctinfo, &addr, |
468 | htons(port), dptr); | 468 | htons(port), dptr); |
469 | } | 469 | } |
470 | } | 470 | } |
diff --git a/net/netfilter/nf_conntrack_tftp.c b/net/netfilter/nf_conntrack_tftp.c index cc19506cf2f8..e894aa1ff3ad 100644 --- a/net/netfilter/nf_conntrack_tftp.c +++ b/net/netfilter/nf_conntrack_tftp.c | |||
@@ -29,12 +29,12 @@ static int ports_c; | |||
29 | module_param_array(ports, ushort, &ports_c, 0400); | 29 | module_param_array(ports, ushort, &ports_c, 0400); |
30 | MODULE_PARM_DESC(ports, "Port numbers of TFTP servers"); | 30 | MODULE_PARM_DESC(ports, "Port numbers of TFTP servers"); |
31 | 31 | ||
32 | unsigned int (*nf_nat_tftp_hook)(struct sk_buff **pskb, | 32 | unsigned int (*nf_nat_tftp_hook)(struct sk_buff *skb, |
33 | enum ip_conntrack_info ctinfo, | 33 | enum ip_conntrack_info ctinfo, |
34 | struct nf_conntrack_expect *exp) __read_mostly; | 34 | struct nf_conntrack_expect *exp) __read_mostly; |
35 | EXPORT_SYMBOL_GPL(nf_nat_tftp_hook); | 35 | EXPORT_SYMBOL_GPL(nf_nat_tftp_hook); |
36 | 36 | ||
37 | static int tftp_help(struct sk_buff **pskb, | 37 | static int tftp_help(struct sk_buff *skb, |
38 | unsigned int protoff, | 38 | unsigned int protoff, |
39 | struct nf_conn *ct, | 39 | struct nf_conn *ct, |
40 | enum ip_conntrack_info ctinfo) | 40 | enum ip_conntrack_info ctinfo) |
@@ -46,7 +46,7 @@ static int tftp_help(struct sk_buff **pskb, | |||
46 | int family = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num; | 46 | int family = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num; |
47 | typeof(nf_nat_tftp_hook) nf_nat_tftp; | 47 | typeof(nf_nat_tftp_hook) nf_nat_tftp; |
48 | 48 | ||
49 | tfh = skb_header_pointer(*pskb, protoff + sizeof(struct udphdr), | 49 | tfh = skb_header_pointer(skb, protoff + sizeof(struct udphdr), |
50 | sizeof(_tftph), &_tftph); | 50 | sizeof(_tftph), &_tftph); |
51 | if (tfh == NULL) | 51 | if (tfh == NULL) |
52 | return NF_ACCEPT; | 52 | return NF_ACCEPT; |
@@ -70,7 +70,7 @@ static int tftp_help(struct sk_buff **pskb, | |||
70 | 70 | ||
71 | nf_nat_tftp = rcu_dereference(nf_nat_tftp_hook); | 71 | nf_nat_tftp = rcu_dereference(nf_nat_tftp_hook); |
72 | if (nf_nat_tftp && ct->status & IPS_NAT_MASK) | 72 | if (nf_nat_tftp && ct->status & IPS_NAT_MASK) |
73 | ret = nf_nat_tftp(pskb, ctinfo, exp); | 73 | ret = nf_nat_tftp(skb, ctinfo, exp); |
74 | else if (nf_ct_expect_related(exp) != 0) | 74 | else if (nf_ct_expect_related(exp) != 0) |
75 | ret = NF_DROP; | 75 | ret = NF_DROP; |
76 | nf_ct_expect_put(exp); | 76 | nf_ct_expect_put(exp); |
diff --git a/net/netfilter/nf_internals.h b/net/netfilter/nf_internals.h index 0df7fff196a7..196269c1e586 100644 --- a/net/netfilter/nf_internals.h +++ b/net/netfilter/nf_internals.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | /* core.c */ | 15 | /* core.c */ |
16 | extern unsigned int nf_iterate(struct list_head *head, | 16 | extern unsigned int nf_iterate(struct list_head *head, |
17 | struct sk_buff **skb, | 17 | struct sk_buff *skb, |
18 | int hook, | 18 | int hook, |
19 | const struct net_device *indev, | 19 | const struct net_device *indev, |
20 | const struct net_device *outdev, | 20 | const struct net_device *outdev, |
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index a481a349f7bf..0cef1433d660 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c | |||
@@ -256,14 +256,14 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info, | |||
256 | 256 | ||
257 | if (verdict == NF_ACCEPT) { | 257 | if (verdict == NF_ACCEPT) { |
258 | afinfo = nf_get_afinfo(info->pf); | 258 | afinfo = nf_get_afinfo(info->pf); |
259 | if (!afinfo || afinfo->reroute(&skb, info) < 0) | 259 | if (!afinfo || afinfo->reroute(skb, info) < 0) |
260 | verdict = NF_DROP; | 260 | verdict = NF_DROP; |
261 | } | 261 | } |
262 | 262 | ||
263 | if (verdict == NF_ACCEPT) { | 263 | if (verdict == NF_ACCEPT) { |
264 | next_hook: | 264 | next_hook: |
265 | verdict = nf_iterate(&nf_hooks[info->pf][info->hook], | 265 | verdict = nf_iterate(&nf_hooks[info->pf][info->hook], |
266 | &skb, info->hook, | 266 | skb, info->hook, |
267 | info->indev, info->outdev, &elem, | 267 | info->indev, info->outdev, &elem, |
268 | info->okfn, INT_MIN); | 268 | info->okfn, INT_MIN); |
269 | } | 269 | } |
diff --git a/net/netfilter/xt_CLASSIFY.c b/net/netfilter/xt_CLASSIFY.c index 07a1b9665005..77eeae658d42 100644 --- a/net/netfilter/xt_CLASSIFY.c +++ b/net/netfilter/xt_CLASSIFY.c | |||
@@ -27,7 +27,7 @@ MODULE_ALIAS("ipt_CLASSIFY"); | |||
27 | MODULE_ALIAS("ip6t_CLASSIFY"); | 27 | MODULE_ALIAS("ip6t_CLASSIFY"); |
28 | 28 | ||
29 | static unsigned int | 29 | static unsigned int |
30 | target(struct sk_buff **pskb, | 30 | target(struct sk_buff *skb, |
31 | const struct net_device *in, | 31 | const struct net_device *in, |
32 | const struct net_device *out, | 32 | const struct net_device *out, |
33 | unsigned int hooknum, | 33 | unsigned int hooknum, |
@@ -36,7 +36,7 @@ target(struct sk_buff **pskb, | |||
36 | { | 36 | { |
37 | const struct xt_classify_target_info *clinfo = targinfo; | 37 | const struct xt_classify_target_info *clinfo = targinfo; |
38 | 38 | ||
39 | (*pskb)->priority = clinfo->priority; | 39 | skb->priority = clinfo->priority; |
40 | return XT_CONTINUE; | 40 | return XT_CONTINUE; |
41 | } | 41 | } |
42 | 42 | ||
diff --git a/net/netfilter/xt_CONNMARK.c b/net/netfilter/xt_CONNMARK.c index 7043c2757e09..8cc324b159e9 100644 --- a/net/netfilter/xt_CONNMARK.c +++ b/net/netfilter/xt_CONNMARK.c | |||
@@ -34,7 +34,7 @@ MODULE_ALIAS("ip6t_CONNMARK"); | |||
34 | #include <net/netfilter/nf_conntrack_ecache.h> | 34 | #include <net/netfilter/nf_conntrack_ecache.h> |
35 | 35 | ||
36 | static unsigned int | 36 | static unsigned int |
37 | target(struct sk_buff **pskb, | 37 | target(struct sk_buff *skb, |
38 | const struct net_device *in, | 38 | const struct net_device *in, |
39 | const struct net_device *out, | 39 | const struct net_device *out, |
40 | unsigned int hooknum, | 40 | unsigned int hooknum, |
@@ -48,28 +48,28 @@ target(struct sk_buff **pskb, | |||
48 | u_int32_t mark; | 48 | u_int32_t mark; |
49 | u_int32_t newmark; | 49 | u_int32_t newmark; |
50 | 50 | ||
51 | ct = nf_ct_get(*pskb, &ctinfo); | 51 | ct = nf_ct_get(skb, &ctinfo); |
52 | if (ct) { | 52 | if (ct) { |
53 | switch(markinfo->mode) { | 53 | switch(markinfo->mode) { |
54 | case XT_CONNMARK_SET: | 54 | case XT_CONNMARK_SET: |
55 | newmark = (ct->mark & ~markinfo->mask) | markinfo->mark; | 55 | newmark = (ct->mark & ~markinfo->mask) | markinfo->mark; |
56 | if (newmark != ct->mark) { | 56 | if (newmark != ct->mark) { |
57 | ct->mark = newmark; | 57 | ct->mark = newmark; |
58 | nf_conntrack_event_cache(IPCT_MARK, *pskb); | 58 | nf_conntrack_event_cache(IPCT_MARK, skb); |
59 | } | 59 | } |
60 | break; | 60 | break; |
61 | case XT_CONNMARK_SAVE: | 61 | case XT_CONNMARK_SAVE: |
62 | newmark = (ct->mark & ~markinfo->mask) | | 62 | newmark = (ct->mark & ~markinfo->mask) | |
63 | ((*pskb)->mark & markinfo->mask); | 63 | (skb->mark & markinfo->mask); |
64 | if (ct->mark != newmark) { | 64 | if (ct->mark != newmark) { |
65 | ct->mark = newmark; | 65 | ct->mark = newmark; |
66 | nf_conntrack_event_cache(IPCT_MARK, *pskb); | 66 | nf_conntrack_event_cache(IPCT_MARK, skb); |
67 | } | 67 | } |
68 | break; | 68 | break; |
69 | case XT_CONNMARK_RESTORE: | 69 | case XT_CONNMARK_RESTORE: |
70 | mark = (*pskb)->mark; | 70 | mark = skb->mark; |
71 | diff = (ct->mark ^ mark) & markinfo->mask; | 71 | diff = (ct->mark ^ mark) & markinfo->mask; |
72 | (*pskb)->mark = mark ^ diff; | 72 | skb->mark = mark ^ diff; |
73 | break; | 73 | break; |
74 | } | 74 | } |
75 | } | 75 | } |
diff --git a/net/netfilter/xt_CONNSECMARK.c b/net/netfilter/xt_CONNSECMARK.c index 63d73138c1b9..021b5c8d20e2 100644 --- a/net/netfilter/xt_CONNSECMARK.c +++ b/net/netfilter/xt_CONNSECMARK.c | |||
@@ -61,12 +61,11 @@ static void secmark_restore(struct sk_buff *skb) | |||
61 | } | 61 | } |
62 | } | 62 | } |
63 | 63 | ||
64 | static unsigned int target(struct sk_buff **pskb, const struct net_device *in, | 64 | static unsigned int target(struct sk_buff *skb, const struct net_device *in, |
65 | const struct net_device *out, unsigned int hooknum, | 65 | const struct net_device *out, unsigned int hooknum, |
66 | const struct xt_target *target, | 66 | const struct xt_target *target, |
67 | const void *targinfo) | 67 | const void *targinfo) |
68 | { | 68 | { |
69 | struct sk_buff *skb = *pskb; | ||
70 | const struct xt_connsecmark_target_info *info = targinfo; | 69 | const struct xt_connsecmark_target_info *info = targinfo; |
71 | 70 | ||
72 | switch (info->mode) { | 71 | switch (info->mode) { |
diff --git a/net/netfilter/xt_DSCP.c b/net/netfilter/xt_DSCP.c index 170661674388..6322a933ab71 100644 --- a/net/netfilter/xt_DSCP.c +++ b/net/netfilter/xt_DSCP.c | |||
@@ -25,7 +25,7 @@ MODULE_LICENSE("GPL"); | |||
25 | MODULE_ALIAS("ipt_DSCP"); | 25 | MODULE_ALIAS("ipt_DSCP"); |
26 | MODULE_ALIAS("ip6t_DSCP"); | 26 | MODULE_ALIAS("ip6t_DSCP"); |
27 | 27 | ||
28 | static unsigned int target(struct sk_buff **pskb, | 28 | static unsigned int target(struct sk_buff *skb, |
29 | const struct net_device *in, | 29 | const struct net_device *in, |
30 | const struct net_device *out, | 30 | const struct net_device *out, |
31 | unsigned int hooknum, | 31 | unsigned int hooknum, |
@@ -33,20 +33,20 @@ static unsigned int target(struct sk_buff **pskb, | |||
33 | const void *targinfo) | 33 | const void *targinfo) |
34 | { | 34 | { |
35 | const struct xt_DSCP_info *dinfo = targinfo; | 35 | const struct xt_DSCP_info *dinfo = targinfo; |
36 | u_int8_t dscp = ipv4_get_dsfield(ip_hdr(*pskb)) >> XT_DSCP_SHIFT; | 36 | u_int8_t dscp = ipv4_get_dsfield(ip_hdr(skb)) >> XT_DSCP_SHIFT; |
37 | 37 | ||
38 | if (dscp != dinfo->dscp) { | 38 | if (dscp != dinfo->dscp) { |
39 | if (!skb_make_writable(*pskb, sizeof(struct iphdr))) | 39 | if (!skb_make_writable(skb, sizeof(struct iphdr))) |
40 | return NF_DROP; | 40 | return NF_DROP; |
41 | 41 | ||
42 | ipv4_change_dsfield(ip_hdr(*pskb), (__u8)(~XT_DSCP_MASK), | 42 | ipv4_change_dsfield(ip_hdr(skb), (__u8)(~XT_DSCP_MASK), |
43 | dinfo->dscp << XT_DSCP_SHIFT); | 43 | dinfo->dscp << XT_DSCP_SHIFT); |
44 | 44 | ||
45 | } | 45 | } |
46 | return XT_CONTINUE; | 46 | return XT_CONTINUE; |
47 | } | 47 | } |
48 | 48 | ||
49 | static unsigned int target6(struct sk_buff **pskb, | 49 | static unsigned int target6(struct sk_buff *skb, |
50 | const struct net_device *in, | 50 | const struct net_device *in, |
51 | const struct net_device *out, | 51 | const struct net_device *out, |
52 | unsigned int hooknum, | 52 | unsigned int hooknum, |
@@ -54,13 +54,13 @@ static unsigned int target6(struct sk_buff **pskb, | |||
54 | const void *targinfo) | 54 | const void *targinfo) |
55 | { | 55 | { |
56 | const struct xt_DSCP_info *dinfo = targinfo; | 56 | const struct xt_DSCP_info *dinfo = targinfo; |
57 | u_int8_t dscp = ipv6_get_dsfield(ipv6_hdr(*pskb)) >> XT_DSCP_SHIFT; | 57 | u_int8_t dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> XT_DSCP_SHIFT; |
58 | 58 | ||
59 | if (dscp != dinfo->dscp) { | 59 | if (dscp != dinfo->dscp) { |
60 | if (!skb_make_writable(*pskb, sizeof(struct ipv6hdr))) | 60 | if (!skb_make_writable(skb, sizeof(struct ipv6hdr))) |
61 | return NF_DROP; | 61 | return NF_DROP; |
62 | 62 | ||
63 | ipv6_change_dsfield(ipv6_hdr(*pskb), (__u8)(~XT_DSCP_MASK), | 63 | ipv6_change_dsfield(ipv6_hdr(skb), (__u8)(~XT_DSCP_MASK), |
64 | dinfo->dscp << XT_DSCP_SHIFT); | 64 | dinfo->dscp << XT_DSCP_SHIFT); |
65 | } | 65 | } |
66 | return XT_CONTINUE; | 66 | return XT_CONTINUE; |
diff --git a/net/netfilter/xt_MARK.c b/net/netfilter/xt_MARK.c index f30fe0baf7de..bc6503d77d75 100644 --- a/net/netfilter/xt_MARK.c +++ b/net/netfilter/xt_MARK.c | |||
@@ -22,7 +22,7 @@ MODULE_ALIAS("ipt_MARK"); | |||
22 | MODULE_ALIAS("ip6t_MARK"); | 22 | MODULE_ALIAS("ip6t_MARK"); |
23 | 23 | ||
24 | static unsigned int | 24 | static unsigned int |
25 | target_v0(struct sk_buff **pskb, | 25 | target_v0(struct sk_buff *skb, |
26 | const struct net_device *in, | 26 | const struct net_device *in, |
27 | const struct net_device *out, | 27 | const struct net_device *out, |
28 | unsigned int hooknum, | 28 | unsigned int hooknum, |
@@ -31,12 +31,12 @@ target_v0(struct sk_buff **pskb, | |||
31 | { | 31 | { |
32 | const struct xt_mark_target_info *markinfo = targinfo; | 32 | const struct xt_mark_target_info *markinfo = targinfo; |
33 | 33 | ||
34 | (*pskb)->mark = markinfo->mark; | 34 | skb->mark = markinfo->mark; |
35 | return XT_CONTINUE; | 35 | return XT_CONTINUE; |
36 | } | 36 | } |
37 | 37 | ||
38 | static unsigned int | 38 | static unsigned int |
39 | target_v1(struct sk_buff **pskb, | 39 | target_v1(struct sk_buff *skb, |
40 | const struct net_device *in, | 40 | const struct net_device *in, |
41 | const struct net_device *out, | 41 | const struct net_device *out, |
42 | unsigned int hooknum, | 42 | unsigned int hooknum, |
@@ -52,15 +52,15 @@ target_v1(struct sk_buff **pskb, | |||
52 | break; | 52 | break; |
53 | 53 | ||
54 | case XT_MARK_AND: | 54 | case XT_MARK_AND: |
55 | mark = (*pskb)->mark & markinfo->mark; | 55 | mark = skb->mark & markinfo->mark; |
56 | break; | 56 | break; |
57 | 57 | ||
58 | case XT_MARK_OR: | 58 | case XT_MARK_OR: |
59 | mark = (*pskb)->mark | markinfo->mark; | 59 | mark = skb->mark | markinfo->mark; |
60 | break; | 60 | break; |
61 | } | 61 | } |
62 | 62 | ||
63 | (*pskb)->mark = mark; | 63 | skb->mark = mark; |
64 | return XT_CONTINUE; | 64 | return XT_CONTINUE; |
65 | } | 65 | } |
66 | 66 | ||
diff --git a/net/netfilter/xt_NFLOG.c b/net/netfilter/xt_NFLOG.c index d3594c7ccb26..9fb449ffbf8b 100644 --- a/net/netfilter/xt_NFLOG.c +++ b/net/netfilter/xt_NFLOG.c | |||
@@ -20,7 +20,7 @@ MODULE_ALIAS("ipt_NFLOG"); | |||
20 | MODULE_ALIAS("ip6t_NFLOG"); | 20 | MODULE_ALIAS("ip6t_NFLOG"); |
21 | 21 | ||
22 | static unsigned int | 22 | static unsigned int |
23 | nflog_target(struct sk_buff **pskb, | 23 | nflog_target(struct sk_buff *skb, |
24 | const struct net_device *in, const struct net_device *out, | 24 | const struct net_device *in, const struct net_device *out, |
25 | unsigned int hooknum, const struct xt_target *target, | 25 | unsigned int hooknum, const struct xt_target *target, |
26 | const void *targinfo) | 26 | const void *targinfo) |
@@ -33,7 +33,7 @@ nflog_target(struct sk_buff **pskb, | |||
33 | li.u.ulog.group = info->group; | 33 | li.u.ulog.group = info->group; |
34 | li.u.ulog.qthreshold = info->threshold; | 34 | li.u.ulog.qthreshold = info->threshold; |
35 | 35 | ||
36 | nf_log_packet(target->family, hooknum, *pskb, in, out, &li, | 36 | nf_log_packet(target->family, hooknum, skb, in, out, &li, |
37 | "%s", info->prefix); | 37 | "%s", info->prefix); |
38 | return XT_CONTINUE; | 38 | return XT_CONTINUE; |
39 | } | 39 | } |
diff --git a/net/netfilter/xt_NFQUEUE.c b/net/netfilter/xt_NFQUEUE.c index 13f59f3e8c38..c3984e9f766a 100644 --- a/net/netfilter/xt_NFQUEUE.c +++ b/net/netfilter/xt_NFQUEUE.c | |||
@@ -24,7 +24,7 @@ MODULE_ALIAS("ip6t_NFQUEUE"); | |||
24 | MODULE_ALIAS("arpt_NFQUEUE"); | 24 | MODULE_ALIAS("arpt_NFQUEUE"); |
25 | 25 | ||
26 | static unsigned int | 26 | static unsigned int |
27 | target(struct sk_buff **pskb, | 27 | target(struct sk_buff *skb, |
28 | const struct net_device *in, | 28 | const struct net_device *in, |
29 | const struct net_device *out, | 29 | const struct net_device *out, |
30 | unsigned int hooknum, | 30 | unsigned int hooknum, |
diff --git a/net/netfilter/xt_NOTRACK.c b/net/netfilter/xt_NOTRACK.c index fec1aefb1c32..4976ce186615 100644 --- a/net/netfilter/xt_NOTRACK.c +++ b/net/netfilter/xt_NOTRACK.c | |||
@@ -12,7 +12,7 @@ MODULE_ALIAS("ipt_NOTRACK"); | |||
12 | MODULE_ALIAS("ip6t_NOTRACK"); | 12 | MODULE_ALIAS("ip6t_NOTRACK"); |
13 | 13 | ||
14 | static unsigned int | 14 | static unsigned int |
15 | target(struct sk_buff **pskb, | 15 | target(struct sk_buff *skb, |
16 | const struct net_device *in, | 16 | const struct net_device *in, |
17 | const struct net_device *out, | 17 | const struct net_device *out, |
18 | unsigned int hooknum, | 18 | unsigned int hooknum, |
@@ -20,16 +20,16 @@ target(struct sk_buff **pskb, | |||
20 | const void *targinfo) | 20 | const void *targinfo) |
21 | { | 21 | { |
22 | /* Previously seen (loopback)? Ignore. */ | 22 | /* Previously seen (loopback)? Ignore. */ |
23 | if ((*pskb)->nfct != NULL) | 23 | if (skb->nfct != NULL) |
24 | return XT_CONTINUE; | 24 | return XT_CONTINUE; |
25 | 25 | ||
26 | /* Attach fake conntrack entry. | 26 | /* Attach fake conntrack entry. |
27 | If there is a real ct entry correspondig to this packet, | 27 | If there is a real ct entry correspondig to this packet, |
28 | it'll hang aroun till timing out. We don't deal with it | 28 | it'll hang aroun till timing out. We don't deal with it |
29 | for performance reasons. JK */ | 29 | for performance reasons. JK */ |
30 | (*pskb)->nfct = &nf_conntrack_untracked.ct_general; | 30 | skb->nfct = &nf_conntrack_untracked.ct_general; |
31 | (*pskb)->nfctinfo = IP_CT_NEW; | 31 | skb->nfctinfo = IP_CT_NEW; |
32 | nf_conntrack_get((*pskb)->nfct); | 32 | nf_conntrack_get(skb->nfct); |
33 | 33 | ||
34 | return XT_CONTINUE; | 34 | return XT_CONTINUE; |
35 | } | 35 | } |
diff --git a/net/netfilter/xt_SECMARK.c b/net/netfilter/xt_SECMARK.c index c83779a941a1..235806eb6ecd 100644 --- a/net/netfilter/xt_SECMARK.c +++ b/net/netfilter/xt_SECMARK.c | |||
@@ -28,7 +28,7 @@ MODULE_ALIAS("ip6t_SECMARK"); | |||
28 | 28 | ||
29 | static u8 mode; | 29 | static u8 mode; |
30 | 30 | ||
31 | static unsigned int target(struct sk_buff **pskb, const struct net_device *in, | 31 | static unsigned int target(struct sk_buff *skb, const struct net_device *in, |
32 | const struct net_device *out, unsigned int hooknum, | 32 | const struct net_device *out, unsigned int hooknum, |
33 | const struct xt_target *target, | 33 | const struct xt_target *target, |
34 | const void *targinfo) | 34 | const void *targinfo) |
@@ -47,7 +47,7 @@ static unsigned int target(struct sk_buff **pskb, const struct net_device *in, | |||
47 | BUG(); | 47 | BUG(); |
48 | } | 48 | } |
49 | 49 | ||
50 | (*pskb)->secmark = secmark; | 50 | skb->secmark = secmark; |
51 | return XT_CONTINUE; | 51 | return XT_CONTINUE; |
52 | } | 52 | } |
53 | 53 | ||
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c index f111edf5f775..07435a602b11 100644 --- a/net/netfilter/xt_TCPMSS.c +++ b/net/netfilter/xt_TCPMSS.c | |||
@@ -39,7 +39,7 @@ optlen(const u_int8_t *opt, unsigned int offset) | |||
39 | } | 39 | } |
40 | 40 | ||
41 | static int | 41 | static int |
42 | tcpmss_mangle_packet(struct sk_buff **pskb, | 42 | tcpmss_mangle_packet(struct sk_buff *skb, |
43 | const struct xt_tcpmss_info *info, | 43 | const struct xt_tcpmss_info *info, |
44 | unsigned int tcphoff, | 44 | unsigned int tcphoff, |
45 | unsigned int minlen) | 45 | unsigned int minlen) |
@@ -50,11 +50,11 @@ tcpmss_mangle_packet(struct sk_buff **pskb, | |||
50 | u16 newmss; | 50 | u16 newmss; |
51 | u8 *opt; | 51 | u8 *opt; |
52 | 52 | ||
53 | if (!skb_make_writable(*pskb, (*pskb)->len)) | 53 | if (!skb_make_writable(skb, skb->len)) |
54 | return -1; | 54 | return -1; |
55 | 55 | ||
56 | tcplen = (*pskb)->len - tcphoff; | 56 | tcplen = skb->len - tcphoff; |
57 | tcph = (struct tcphdr *)(skb_network_header(*pskb) + tcphoff); | 57 | tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); |
58 | 58 | ||
59 | /* Since it passed flags test in tcp match, we know it is is | 59 | /* Since it passed flags test in tcp match, we know it is is |
60 | not a fragment, and has data >= tcp header length. SYN | 60 | not a fragment, and has data >= tcp header length. SYN |
@@ -64,19 +64,19 @@ tcpmss_mangle_packet(struct sk_buff **pskb, | |||
64 | if (tcplen != tcph->doff*4) { | 64 | if (tcplen != tcph->doff*4) { |
65 | if (net_ratelimit()) | 65 | if (net_ratelimit()) |
66 | printk(KERN_ERR "xt_TCPMSS: bad length (%u bytes)\n", | 66 | printk(KERN_ERR "xt_TCPMSS: bad length (%u bytes)\n", |
67 | (*pskb)->len); | 67 | skb->len); |
68 | return -1; | 68 | return -1; |
69 | } | 69 | } |
70 | 70 | ||
71 | if (info->mss == XT_TCPMSS_CLAMP_PMTU) { | 71 | if (info->mss == XT_TCPMSS_CLAMP_PMTU) { |
72 | if (dst_mtu((*pskb)->dst) <= minlen) { | 72 | if (dst_mtu(skb->dst) <= minlen) { |
73 | if (net_ratelimit()) | 73 | if (net_ratelimit()) |
74 | printk(KERN_ERR "xt_TCPMSS: " | 74 | printk(KERN_ERR "xt_TCPMSS: " |
75 | "unknown or invalid path-MTU (%u)\n", | 75 | "unknown or invalid path-MTU (%u)\n", |
76 | dst_mtu((*pskb)->dst)); | 76 | dst_mtu(skb->dst)); |
77 | return -1; | 77 | return -1; |
78 | } | 78 | } |
79 | newmss = dst_mtu((*pskb)->dst) - minlen; | 79 | newmss = dst_mtu(skb->dst) - minlen; |
80 | } else | 80 | } else |
81 | newmss = info->mss; | 81 | newmss = info->mss; |
82 | 82 | ||
@@ -95,7 +95,7 @@ tcpmss_mangle_packet(struct sk_buff **pskb, | |||
95 | opt[i+2] = (newmss & 0xff00) >> 8; | 95 | opt[i+2] = (newmss & 0xff00) >> 8; |
96 | opt[i+3] = newmss & 0x00ff; | 96 | opt[i+3] = newmss & 0x00ff; |
97 | 97 | ||
98 | nf_proto_csum_replace2(&tcph->check, *pskb, | 98 | nf_proto_csum_replace2(&tcph->check, skb, |
99 | htons(oldmss), htons(newmss), 0); | 99 | htons(oldmss), htons(newmss), 0); |
100 | return 0; | 100 | return 0; |
101 | } | 101 | } |
@@ -104,53 +104,53 @@ tcpmss_mangle_packet(struct sk_buff **pskb, | |||
104 | /* | 104 | /* |
105 | * MSS Option not found ?! add it.. | 105 | * MSS Option not found ?! add it.. |
106 | */ | 106 | */ |
107 | if (skb_tailroom((*pskb)) < TCPOLEN_MSS) { | 107 | if (skb_tailroom(skb) < TCPOLEN_MSS) { |
108 | if (pskb_expand_head(*pskb, 0, | 108 | if (pskb_expand_head(skb, 0, |
109 | TCPOLEN_MSS - skb_tailroom(*pskb), | 109 | TCPOLEN_MSS - skb_tailroom(skb), |
110 | GFP_ATOMIC)) | 110 | GFP_ATOMIC)) |
111 | return -1; | 111 | return -1; |
112 | tcph = (struct tcphdr *)(skb_network_header(*pskb) + tcphoff); | 112 | tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); |
113 | } | 113 | } |
114 | 114 | ||
115 | skb_put((*pskb), TCPOLEN_MSS); | 115 | skb_put(skb, TCPOLEN_MSS); |
116 | 116 | ||
117 | opt = (u_int8_t *)tcph + sizeof(struct tcphdr); | 117 | opt = (u_int8_t *)tcph + sizeof(struct tcphdr); |
118 | memmove(opt + TCPOLEN_MSS, opt, tcplen - sizeof(struct tcphdr)); | 118 | memmove(opt + TCPOLEN_MSS, opt, tcplen - sizeof(struct tcphdr)); |
119 | 119 | ||
120 | nf_proto_csum_replace2(&tcph->check, *pskb, | 120 | nf_proto_csum_replace2(&tcph->check, skb, |
121 | htons(tcplen), htons(tcplen + TCPOLEN_MSS), 1); | 121 | htons(tcplen), htons(tcplen + TCPOLEN_MSS), 1); |
122 | opt[0] = TCPOPT_MSS; | 122 | opt[0] = TCPOPT_MSS; |
123 | opt[1] = TCPOLEN_MSS; | 123 | opt[1] = TCPOLEN_MSS; |
124 | opt[2] = (newmss & 0xff00) >> 8; | 124 | opt[2] = (newmss & 0xff00) >> 8; |
125 | opt[3] = newmss & 0x00ff; | 125 | opt[3] = newmss & 0x00ff; |
126 | 126 | ||
127 | nf_proto_csum_replace4(&tcph->check, *pskb, 0, *((__be32 *)opt), 0); | 127 | nf_proto_csum_replace4(&tcph->check, skb, 0, *((__be32 *)opt), 0); |
128 | 128 | ||
129 | oldval = ((__be16 *)tcph)[6]; | 129 | oldval = ((__be16 *)tcph)[6]; |
130 | tcph->doff += TCPOLEN_MSS/4; | 130 | tcph->doff += TCPOLEN_MSS/4; |
131 | nf_proto_csum_replace2(&tcph->check, *pskb, | 131 | nf_proto_csum_replace2(&tcph->check, skb, |
132 | oldval, ((__be16 *)tcph)[6], 0); | 132 | oldval, ((__be16 *)tcph)[6], 0); |
133 | return TCPOLEN_MSS; | 133 | return TCPOLEN_MSS; |
134 | } | 134 | } |
135 | 135 | ||
136 | static unsigned int | 136 | static unsigned int |
137 | xt_tcpmss_target4(struct sk_buff **pskb, | 137 | xt_tcpmss_target4(struct sk_buff *skb, |
138 | const struct net_device *in, | 138 | const struct net_device *in, |
139 | const struct net_device *out, | 139 | const struct net_device *out, |
140 | unsigned int hooknum, | 140 | unsigned int hooknum, |
141 | const struct xt_target *target, | 141 | const struct xt_target *target, |
142 | const void *targinfo) | 142 | const void *targinfo) |
143 | { | 143 | { |
144 | struct iphdr *iph = ip_hdr(*pskb); | 144 | struct iphdr *iph = ip_hdr(skb); |
145 | __be16 newlen; | 145 | __be16 newlen; |
146 | int ret; | 146 | int ret; |
147 | 147 | ||
148 | ret = tcpmss_mangle_packet(pskb, targinfo, iph->ihl * 4, | 148 | ret = tcpmss_mangle_packet(skb, targinfo, iph->ihl * 4, |
149 | sizeof(*iph) + sizeof(struct tcphdr)); | 149 | sizeof(*iph) + sizeof(struct tcphdr)); |
150 | if (ret < 0) | 150 | if (ret < 0) |
151 | return NF_DROP; | 151 | return NF_DROP; |
152 | if (ret > 0) { | 152 | if (ret > 0) { |
153 | iph = ip_hdr(*pskb); | 153 | iph = ip_hdr(skb); |
154 | newlen = htons(ntohs(iph->tot_len) + ret); | 154 | newlen = htons(ntohs(iph->tot_len) + ret); |
155 | nf_csum_replace2(&iph->check, iph->tot_len, newlen); | 155 | nf_csum_replace2(&iph->check, iph->tot_len, newlen); |
156 | iph->tot_len = newlen; | 156 | iph->tot_len = newlen; |
@@ -160,30 +160,30 @@ xt_tcpmss_target4(struct sk_buff **pskb, | |||
160 | 160 | ||
161 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 161 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) |
162 | static unsigned int | 162 | static unsigned int |
163 | xt_tcpmss_target6(struct sk_buff **pskb, | 163 | xt_tcpmss_target6(struct sk_buff *skb, |
164 | const struct net_device *in, | 164 | const struct net_device *in, |
165 | const struct net_device *out, | 165 | const struct net_device *out, |
166 | unsigned int hooknum, | 166 | unsigned int hooknum, |
167 | const struct xt_target *target, | 167 | const struct xt_target *target, |
168 | const void *targinfo) | 168 | const void *targinfo) |
169 | { | 169 | { |
170 | struct ipv6hdr *ipv6h = ipv6_hdr(*pskb); | 170 | struct ipv6hdr *ipv6h = ipv6_hdr(skb); |
171 | u8 nexthdr; | 171 | u8 nexthdr; |
172 | int tcphoff; | 172 | int tcphoff; |
173 | int ret; | 173 | int ret; |
174 | 174 | ||
175 | nexthdr = ipv6h->nexthdr; | 175 | nexthdr = ipv6h->nexthdr; |
176 | tcphoff = ipv6_skip_exthdr(*pskb, sizeof(*ipv6h), &nexthdr); | 176 | tcphoff = ipv6_skip_exthdr(skb, sizeof(*ipv6h), &nexthdr); |
177 | if (tcphoff < 0) { | 177 | if (tcphoff < 0) { |
178 | WARN_ON(1); | 178 | WARN_ON(1); |
179 | return NF_DROP; | 179 | return NF_DROP; |
180 | } | 180 | } |
181 | ret = tcpmss_mangle_packet(pskb, targinfo, tcphoff, | 181 | ret = tcpmss_mangle_packet(skb, targinfo, tcphoff, |
182 | sizeof(*ipv6h) + sizeof(struct tcphdr)); | 182 | sizeof(*ipv6h) + sizeof(struct tcphdr)); |
183 | if (ret < 0) | 183 | if (ret < 0) |
184 | return NF_DROP; | 184 | return NF_DROP; |
185 | if (ret > 0) { | 185 | if (ret > 0) { |
186 | ipv6h = ipv6_hdr(*pskb); | 186 | ipv6h = ipv6_hdr(skb); |
187 | ipv6h->payload_len = htons(ntohs(ipv6h->payload_len) + ret); | 187 | ipv6h->payload_len = htons(ntohs(ipv6h->payload_len) + ret); |
188 | } | 188 | } |
189 | return XT_CONTINUE; | 189 | return XT_CONTINUE; |
diff --git a/net/netfilter/xt_TRACE.c b/net/netfilter/xt_TRACE.c index 4df2dedcc0b5..26c5d08ab2c2 100644 --- a/net/netfilter/xt_TRACE.c +++ b/net/netfilter/xt_TRACE.c | |||
@@ -10,14 +10,14 @@ MODULE_ALIAS("ipt_TRACE"); | |||
10 | MODULE_ALIAS("ip6t_TRACE"); | 10 | MODULE_ALIAS("ip6t_TRACE"); |
11 | 11 | ||
12 | static unsigned int | 12 | static unsigned int |
13 | target(struct sk_buff **pskb, | 13 | target(struct sk_buff *skb, |
14 | const struct net_device *in, | 14 | const struct net_device *in, |
15 | const struct net_device *out, | 15 | const struct net_device *out, |
16 | unsigned int hooknum, | 16 | unsigned int hooknum, |
17 | const struct xt_target *target, | 17 | const struct xt_target *target, |
18 | const void *targinfo) | 18 | const void *targinfo) |
19 | { | 19 | { |
20 | (*pskb)->nf_trace = 1; | 20 | skb->nf_trace = 1; |
21 | return XT_CONTINUE; | 21 | return XT_CONTINUE; |
22 | } | 22 | } |
23 | 23 | ||