diff options
author | Martin Josefsson <gandalf@wlug.westbo.se> | 2006-11-28 20:35:06 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:31:09 -0500 |
commit | 605dcad6c85226e6d43387917b329d65b95cef39 (patch) | |
tree | e18d19e93a9c1dcf268fb1ed8e91246c3440ba5b /net/ipv6 | |
parent | e2b7606cdb602a4f69c02cfc8bebe9c63b595e24 (diff) |
[NETFILTER]: nf_conntrack: rename struct nf_conntrack_protocol
Rename 'struct nf_conntrack_protocol' to 'struct nf_conntrack_l4proto' in
order to help distinguish it from 'struct nf_conntrack_l3proto'. It gets
rather confusing with 'nf_conntrack_protocol'.
Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 26 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 12 |
2 files changed, 19 insertions, 19 deletions
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c index e5e53fff9e38..cdbba44017df 100644 --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/netfilter_ipv6.h> | 33 | #include <linux/netfilter_ipv6.h> |
34 | #include <net/netfilter/nf_conntrack.h> | 34 | #include <net/netfilter/nf_conntrack.h> |
35 | #include <net/netfilter/nf_conntrack_helper.h> | 35 | #include <net/netfilter/nf_conntrack_helper.h> |
36 | #include <net/netfilter/nf_conntrack_protocol.h> | 36 | #include <net/netfilter/nf_conntrack_l4proto.h> |
37 | #include <net/netfilter/nf_conntrack_l3proto.h> | 37 | #include <net/netfilter/nf_conntrack_l3proto.h> |
38 | #include <net/netfilter/nf_conntrack_core.h> | 38 | #include <net/netfilter/nf_conntrack_core.h> |
39 | 39 | ||
@@ -458,9 +458,9 @@ struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6 = { | |||
458 | .me = THIS_MODULE, | 458 | .me = THIS_MODULE, |
459 | }; | 459 | }; |
460 | 460 | ||
461 | extern struct nf_conntrack_protocol nf_conntrack_protocol_tcp6; | 461 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6; |
462 | extern struct nf_conntrack_protocol nf_conntrack_protocol_udp6; | 462 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6; |
463 | extern struct nf_conntrack_protocol nf_conntrack_protocol_icmpv6; | 463 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6; |
464 | extern int nf_ct_frag6_init(void); | 464 | extern int nf_ct_frag6_init(void); |
465 | extern void nf_ct_frag6_cleanup(void); | 465 | extern void nf_ct_frag6_cleanup(void); |
466 | 466 | ||
@@ -479,19 +479,19 @@ static int __init nf_conntrack_l3proto_ipv6_init(void) | |||
479 | printk("nf_conntrack_ipv6: can't initialize frag6.\n"); | 479 | printk("nf_conntrack_ipv6: can't initialize frag6.\n"); |
480 | return ret; | 480 | return ret; |
481 | } | 481 | } |
482 | ret = nf_conntrack_protocol_register(&nf_conntrack_protocol_tcp6); | 482 | ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_tcp6); |
483 | if (ret < 0) { | 483 | if (ret < 0) { |
484 | printk("nf_conntrack_ipv6: can't register tcp.\n"); | 484 | printk("nf_conntrack_ipv6: can't register tcp.\n"); |
485 | goto cleanup_frag6; | 485 | goto cleanup_frag6; |
486 | } | 486 | } |
487 | 487 | ||
488 | ret = nf_conntrack_protocol_register(&nf_conntrack_protocol_udp6); | 488 | ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_udp6); |
489 | if (ret < 0) { | 489 | if (ret < 0) { |
490 | printk("nf_conntrack_ipv6: can't register udp.\n"); | 490 | printk("nf_conntrack_ipv6: can't register udp.\n"); |
491 | goto cleanup_tcp; | 491 | goto cleanup_tcp; |
492 | } | 492 | } |
493 | 493 | ||
494 | ret = nf_conntrack_protocol_register(&nf_conntrack_protocol_icmpv6); | 494 | ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_icmpv6); |
495 | if (ret < 0) { | 495 | if (ret < 0) { |
496 | printk("nf_conntrack_ipv6: can't register icmpv6.\n"); | 496 | printk("nf_conntrack_ipv6: can't register icmpv6.\n"); |
497 | goto cleanup_udp; | 497 | goto cleanup_udp; |
@@ -527,11 +527,11 @@ static int __init nf_conntrack_l3proto_ipv6_init(void) | |||
527 | cleanup_ipv6: | 527 | cleanup_ipv6: |
528 | nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv6); | 528 | nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv6); |
529 | cleanup_icmpv6: | 529 | cleanup_icmpv6: |
530 | nf_conntrack_protocol_unregister(&nf_conntrack_protocol_icmpv6); | 530 | nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_icmpv6); |
531 | cleanup_udp: | 531 | cleanup_udp: |
532 | nf_conntrack_protocol_unregister(&nf_conntrack_protocol_udp6); | 532 | nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_udp6); |
533 | cleanup_tcp: | 533 | cleanup_tcp: |
534 | nf_conntrack_protocol_unregister(&nf_conntrack_protocol_tcp6); | 534 | nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_tcp6); |
535 | cleanup_frag6: | 535 | cleanup_frag6: |
536 | nf_ct_frag6_cleanup(); | 536 | nf_ct_frag6_cleanup(); |
537 | return ret; | 537 | return ret; |
@@ -545,9 +545,9 @@ static void __exit nf_conntrack_l3proto_ipv6_fini(void) | |||
545 | #endif | 545 | #endif |
546 | nf_unregister_hooks(ipv6_conntrack_ops, ARRAY_SIZE(ipv6_conntrack_ops)); | 546 | nf_unregister_hooks(ipv6_conntrack_ops, ARRAY_SIZE(ipv6_conntrack_ops)); |
547 | nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv6); | 547 | nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv6); |
548 | nf_conntrack_protocol_unregister(&nf_conntrack_protocol_icmpv6); | 548 | nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_icmpv6); |
549 | nf_conntrack_protocol_unregister(&nf_conntrack_protocol_udp6); | 549 | nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_udp6); |
550 | nf_conntrack_protocol_unregister(&nf_conntrack_protocol_tcp6); | 550 | nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_tcp6); |
551 | nf_ct_frag6_cleanup(); | 551 | nf_ct_frag6_cleanup(); |
552 | } | 552 | } |
553 | 553 | ||
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c index 34d447208ffd..2cdf225f162d 100644 --- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c +++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/seq_file.h> | 29 | #include <linux/seq_file.h> |
30 | #include <linux/netfilter_ipv6.h> | 30 | #include <linux/netfilter_ipv6.h> |
31 | #include <net/netfilter/nf_conntrack_tuple.h> | 31 | #include <net/netfilter/nf_conntrack_tuple.h> |
32 | #include <net/netfilter/nf_conntrack_protocol.h> | 32 | #include <net/netfilter/nf_conntrack_l4proto.h> |
33 | #include <net/netfilter/nf_conntrack_core.h> | 33 | #include <net/netfilter/nf_conntrack_core.h> |
34 | #include <net/netfilter/ipv6/nf_conntrack_icmpv6.h> | 34 | #include <net/netfilter/ipv6/nf_conntrack_icmpv6.h> |
35 | 35 | ||
@@ -155,7 +155,7 @@ icmpv6_error_message(struct sk_buff *skb, | |||
155 | struct nf_conntrack_tuple_hash *h; | 155 | struct nf_conntrack_tuple_hash *h; |
156 | struct icmp6hdr _hdr, *hp; | 156 | struct icmp6hdr _hdr, *hp; |
157 | unsigned int inip6off; | 157 | unsigned int inip6off; |
158 | struct nf_conntrack_protocol *inproto; | 158 | struct nf_conntrack_l4proto *inproto; |
159 | u_int8_t inprotonum; | 159 | u_int8_t inprotonum; |
160 | unsigned int inprotoff; | 160 | unsigned int inprotoff; |
161 | 161 | ||
@@ -185,7 +185,7 @@ icmpv6_error_message(struct sk_buff *skb, | |||
185 | return -NF_ACCEPT; | 185 | return -NF_ACCEPT; |
186 | } | 186 | } |
187 | 187 | ||
188 | inproto = __nf_ct_proto_find(PF_INET6, inprotonum); | 188 | inproto = __nf_ct_l4proto_find(PF_INET6, inprotonum); |
189 | 189 | ||
190 | /* Are they talking about one of our connections? */ | 190 | /* Are they talking about one of our connections? */ |
191 | if (!nf_ct_get_tuple(skb, inip6off, inprotoff, PF_INET6, inprotonum, | 191 | if (!nf_ct_get_tuple(skb, inip6off, inprotoff, PF_INET6, inprotonum, |
@@ -301,10 +301,10 @@ static int icmpv6_nfattr_to_tuple(struct nfattr *tb[], | |||
301 | } | 301 | } |
302 | #endif | 302 | #endif |
303 | 303 | ||
304 | struct nf_conntrack_protocol nf_conntrack_protocol_icmpv6 = | 304 | struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6 = |
305 | { | 305 | { |
306 | .l3proto = PF_INET6, | 306 | .l3proto = PF_INET6, |
307 | .proto = IPPROTO_ICMPV6, | 307 | .l4proto = IPPROTO_ICMPV6, |
308 | .name = "icmpv6", | 308 | .name = "icmpv6", |
309 | .pkt_to_tuple = icmpv6_pkt_to_tuple, | 309 | .pkt_to_tuple = icmpv6_pkt_to_tuple, |
310 | .invert_tuple = icmpv6_invert_tuple, | 310 | .invert_tuple = icmpv6_invert_tuple, |
@@ -320,4 +320,4 @@ struct nf_conntrack_protocol nf_conntrack_protocol_icmpv6 = | |||
320 | #endif | 320 | #endif |
321 | }; | 321 | }; |
322 | 322 | ||
323 | EXPORT_SYMBOL(nf_conntrack_protocol_icmpv6); | 323 | EXPORT_SYMBOL(nf_conntrack_l4proto_icmpv6); |