diff options
author | Jan Engelhardt <jengelh@gmx.de> | 2007-02-07 18:11:19 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-08 15:39:19 -0500 |
commit | 6709dbbb1978abe039ea4b76c364bf003bf40de5 (patch) | |
tree | fd0349415e398f9bc984461974a64c7024035356 /net/ipv6 | |
parent | e1fd0586b04d624c597834320d9e57d6f2f4b878 (diff) |
[NETFILTER]: {ip,ip6}_tables: remove x_tables wrapper functions
Use the x_tables functions directly to make it better visible which
parts are shared between ip_tables and ip6_tables.
Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 12 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_HL.c | 14 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_LOG.c | 10 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_REJECT.c | 10 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_ah.c | 8 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_eui64.c | 8 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_frag.c | 8 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_hbh.c | 1 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_hl.c | 11 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_ipv6header.c | 8 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_owner.c | 8 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_rt.c | 8 |
12 files changed, 63 insertions, 43 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 99502c5da4c4..7083e1cfb2f5 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -530,7 +530,7 @@ check_match(struct ip6t_entry_match *m, | |||
530 | unsigned int hookmask, | 530 | unsigned int hookmask, |
531 | unsigned int *i) | 531 | unsigned int *i) |
532 | { | 532 | { |
533 | struct ip6t_match *match; | 533 | struct xt_match *match; |
534 | int ret; | 534 | int ret; |
535 | 535 | ||
536 | match = try_then_request_module(xt_find_match(AF_INET6, m->u.user.name, | 536 | match = try_then_request_module(xt_find_match(AF_INET6, m->u.user.name, |
@@ -564,14 +564,14 @@ err: | |||
564 | return ret; | 564 | return ret; |
565 | } | 565 | } |
566 | 566 | ||
567 | static struct ip6t_target ip6t_standard_target; | 567 | static struct xt_target ip6t_standard_target; |
568 | 568 | ||
569 | static inline int | 569 | static inline int |
570 | check_entry(struct ip6t_entry *e, const char *name, unsigned int size, | 570 | check_entry(struct ip6t_entry *e, const char *name, unsigned int size, |
571 | unsigned int *i) | 571 | unsigned int *i) |
572 | { | 572 | { |
573 | struct ip6t_entry_target *t; | 573 | struct ip6t_entry_target *t; |
574 | struct ip6t_target *target; | 574 | struct xt_target *target; |
575 | int ret; | 575 | int ret; |
576 | unsigned int j; | 576 | unsigned int j; |
577 | 577 | ||
@@ -1348,13 +1348,13 @@ icmp6_checkentry(const char *tablename, | |||
1348 | } | 1348 | } |
1349 | 1349 | ||
1350 | /* The built-in targets: standard (NULL) and error. */ | 1350 | /* The built-in targets: standard (NULL) and error. */ |
1351 | static struct ip6t_target ip6t_standard_target = { | 1351 | static struct xt_target ip6t_standard_target = { |
1352 | .name = IP6T_STANDARD_TARGET, | 1352 | .name = IP6T_STANDARD_TARGET, |
1353 | .targetsize = sizeof(int), | 1353 | .targetsize = sizeof(int), |
1354 | .family = AF_INET6, | 1354 | .family = AF_INET6, |
1355 | }; | 1355 | }; |
1356 | 1356 | ||
1357 | static struct ip6t_target ip6t_error_target = { | 1357 | static struct xt_target ip6t_error_target = { |
1358 | .name = IP6T_ERROR_TARGET, | 1358 | .name = IP6T_ERROR_TARGET, |
1359 | .target = ip6t_error, | 1359 | .target = ip6t_error, |
1360 | .targetsize = IP6T_FUNCTION_MAXNAMELEN, | 1360 | .targetsize = IP6T_FUNCTION_MAXNAMELEN, |
@@ -1371,7 +1371,7 @@ static struct nf_sockopt_ops ip6t_sockopts = { | |||
1371 | .get = do_ip6t_get_ctl, | 1371 | .get = do_ip6t_get_ctl, |
1372 | }; | 1372 | }; |
1373 | 1373 | ||
1374 | static struct ip6t_match icmp6_matchstruct = { | 1374 | static struct xt_match icmp6_matchstruct = { |
1375 | .name = "icmp6", | 1375 | .name = "icmp6", |
1376 | .match = &icmp6_match, | 1376 | .match = &icmp6_match, |
1377 | .matchsize = sizeof(struct ip6t_icmp), | 1377 | .matchsize = sizeof(struct ip6t_icmp), |
diff --git a/net/ipv6/netfilter/ip6t_HL.c b/net/ipv6/netfilter/ip6t_HL.c index 7e5d51386f56..04e500172fb4 100644 --- a/net/ipv6/netfilter/ip6t_HL.c +++ b/net/ipv6/netfilter/ip6t_HL.c | |||
@@ -9,12 +9,13 @@ | |||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/skbuff.h> | 10 | #include <linux/skbuff.h> |
11 | #include <linux/ip.h> | 11 | #include <linux/ip.h> |
12 | #include <linux/ipv6.h> | ||
12 | 13 | ||
13 | #include <linux/netfilter_ipv6/ip6_tables.h> | 14 | #include <linux/netfilter/x_tables.h> |
14 | #include <linux/netfilter_ipv6/ip6t_HL.h> | 15 | #include <linux/netfilter_ipv6/ip6t_HL.h> |
15 | 16 | ||
16 | MODULE_AUTHOR("Maciej Soltysiak <solt@dns.toxicfilms.tv>"); | 17 | MODULE_AUTHOR("Maciej Soltysiak <solt@dns.toxicfilms.tv>"); |
17 | MODULE_DESCRIPTION("IP tables Hop Limit modification module"); | 18 | MODULE_DESCRIPTION("IP6 tables Hop Limit modification module"); |
18 | MODULE_LICENSE("GPL"); | 19 | MODULE_LICENSE("GPL"); |
19 | 20 | ||
20 | static unsigned int ip6t_hl_target(struct sk_buff **pskb, | 21 | static unsigned int ip6t_hl_target(struct sk_buff **pskb, |
@@ -54,7 +55,7 @@ static unsigned int ip6t_hl_target(struct sk_buff **pskb, | |||
54 | 55 | ||
55 | ip6h->hop_limit = new_hl; | 56 | ip6h->hop_limit = new_hl; |
56 | 57 | ||
57 | return IP6T_CONTINUE; | 58 | return XT_CONTINUE; |
58 | } | 59 | } |
59 | 60 | ||
60 | static int ip6t_hl_checkentry(const char *tablename, | 61 | static int ip6t_hl_checkentry(const char *tablename, |
@@ -78,8 +79,9 @@ static int ip6t_hl_checkentry(const char *tablename, | |||
78 | return 1; | 79 | return 1; |
79 | } | 80 | } |
80 | 81 | ||
81 | static struct ip6t_target ip6t_HL = { | 82 | static struct xt_target ip6t_HL = { |
82 | .name = "HL", | 83 | .name = "HL", |
84 | .family = AF_INET6, | ||
83 | .target = ip6t_hl_target, | 85 | .target = ip6t_hl_target, |
84 | .targetsize = sizeof(struct ip6t_HL_info), | 86 | .targetsize = sizeof(struct ip6t_HL_info), |
85 | .table = "mangle", | 87 | .table = "mangle", |
@@ -89,12 +91,12 @@ static struct ip6t_target ip6t_HL = { | |||
89 | 91 | ||
90 | static int __init ip6t_hl_init(void) | 92 | static int __init ip6t_hl_init(void) |
91 | { | 93 | { |
92 | return ip6t_register_target(&ip6t_HL); | 94 | return xt_register_target(&ip6t_HL); |
93 | } | 95 | } |
94 | 96 | ||
95 | static void __exit ip6t_hl_fini(void) | 97 | static void __exit ip6t_hl_fini(void) |
96 | { | 98 | { |
97 | ip6t_unregister_target(&ip6t_HL); | 99 | xt_unregister_target(&ip6t_HL); |
98 | } | 100 | } |
99 | 101 | ||
100 | module_init(ip6t_hl_init); | 102 | module_init(ip6t_hl_init); |
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c index 9fe0816bb21d..5587a77b884c 100644 --- a/net/ipv6/netfilter/ip6t_LOG.c +++ b/net/ipv6/netfilter/ip6t_LOG.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <net/tcp.h> | 21 | #include <net/tcp.h> |
22 | #include <net/ipv6.h> | 22 | #include <net/ipv6.h> |
23 | #include <linux/netfilter.h> | 23 | #include <linux/netfilter.h> |
24 | #include <linux/netfilter/x_tables.h> | ||
24 | #include <linux/netfilter_ipv6/ip6_tables.h> | 25 | #include <linux/netfilter_ipv6/ip6_tables.h> |
25 | 26 | ||
26 | MODULE_AUTHOR("Jan Rekorajski <baggins@pld.org.pl>"); | 27 | MODULE_AUTHOR("Jan Rekorajski <baggins@pld.org.pl>"); |
@@ -442,7 +443,7 @@ ip6t_log_target(struct sk_buff **pskb, | |||
442 | 443 | ||
443 | ip6t_log_packet(PF_INET6, hooknum, *pskb, in, out, &li, | 444 | ip6t_log_packet(PF_INET6, hooknum, *pskb, in, out, &li, |
444 | loginfo->prefix); | 445 | loginfo->prefix); |
445 | return IP6T_CONTINUE; | 446 | return XT_CONTINUE; |
446 | } | 447 | } |
447 | 448 | ||
448 | 449 | ||
@@ -466,8 +467,9 @@ static int ip6t_log_checkentry(const char *tablename, | |||
466 | return 1; | 467 | return 1; |
467 | } | 468 | } |
468 | 469 | ||
469 | static struct ip6t_target ip6t_log_reg = { | 470 | static struct xt_target ip6t_log_reg = { |
470 | .name = "LOG", | 471 | .name = "LOG", |
472 | .family = AF_INET6, | ||
471 | .target = ip6t_log_target, | 473 | .target = ip6t_log_target, |
472 | .targetsize = sizeof(struct ip6t_log_info), | 474 | .targetsize = sizeof(struct ip6t_log_info), |
473 | .checkentry = ip6t_log_checkentry, | 475 | .checkentry = ip6t_log_checkentry, |
@@ -484,7 +486,7 @@ static int __init ip6t_log_init(void) | |||
484 | { | 486 | { |
485 | int ret; | 487 | int ret; |
486 | 488 | ||
487 | ret = ip6t_register_target(&ip6t_log_reg); | 489 | ret = xt_register_target(&ip6t_log_reg); |
488 | if (ret < 0) | 490 | if (ret < 0) |
489 | return ret; | 491 | return ret; |
490 | if (nf_log_register(PF_INET6, &ip6t_logger) < 0) { | 492 | if (nf_log_register(PF_INET6, &ip6t_logger) < 0) { |
@@ -500,7 +502,7 @@ static int __init ip6t_log_init(void) | |||
500 | static void __exit ip6t_log_fini(void) | 502 | static void __exit ip6t_log_fini(void) |
501 | { | 503 | { |
502 | nf_log_unregister_logger(&ip6t_logger); | 504 | nf_log_unregister_logger(&ip6t_logger); |
503 | ip6t_unregister_target(&ip6t_log_reg); | 505 | xt_unregister_target(&ip6t_log_reg); |
504 | } | 506 | } |
505 | 507 | ||
506 | module_init(ip6t_log_init); | 508 | module_init(ip6t_log_init); |
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index 311eae82feb3..278349c18793 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <net/ip6_fib.h> | 26 | #include <net/ip6_fib.h> |
27 | #include <net/ip6_route.h> | 27 | #include <net/ip6_route.h> |
28 | #include <net/flow.h> | 28 | #include <net/flow.h> |
29 | #include <linux/netfilter/x_tables.h> | ||
29 | #include <linux/netfilter_ipv6/ip6_tables.h> | 30 | #include <linux/netfilter_ipv6/ip6_tables.h> |
30 | #include <linux/netfilter_ipv6/ip6t_REJECT.h> | 31 | #include <linux/netfilter_ipv6/ip6t_REJECT.h> |
31 | 32 | ||
@@ -234,7 +235,7 @@ static int check(const char *tablename, | |||
234 | } else if (rejinfo->with == IP6T_TCP_RESET) { | 235 | } else if (rejinfo->with == IP6T_TCP_RESET) { |
235 | /* Must specify that it's a TCP packet */ | 236 | /* Must specify that it's a TCP packet */ |
236 | if (e->ipv6.proto != IPPROTO_TCP | 237 | if (e->ipv6.proto != IPPROTO_TCP |
237 | || (e->ipv6.invflags & IP6T_INV_PROTO)) { | 238 | || (e->ipv6.invflags & XT_INV_PROTO)) { |
238 | DEBUGP("ip6t_REJECT: TCP_RESET illegal for non-tcp\n"); | 239 | DEBUGP("ip6t_REJECT: TCP_RESET illegal for non-tcp\n"); |
239 | return 0; | 240 | return 0; |
240 | } | 241 | } |
@@ -242,8 +243,9 @@ static int check(const char *tablename, | |||
242 | return 1; | 243 | return 1; |
243 | } | 244 | } |
244 | 245 | ||
245 | static struct ip6t_target ip6t_reject_reg = { | 246 | static struct xt_target ip6t_reject_reg = { |
246 | .name = "REJECT", | 247 | .name = "REJECT", |
248 | .family = AF_INET6, | ||
247 | .target = reject6_target, | 249 | .target = reject6_target, |
248 | .targetsize = sizeof(struct ip6t_reject_info), | 250 | .targetsize = sizeof(struct ip6t_reject_info), |
249 | .table = "filter", | 251 | .table = "filter", |
@@ -255,12 +257,12 @@ static struct ip6t_target ip6t_reject_reg = { | |||
255 | 257 | ||
256 | static int __init ip6t_reject_init(void) | 258 | static int __init ip6t_reject_init(void) |
257 | { | 259 | { |
258 | return ip6t_register_target(&ip6t_reject_reg); | 260 | return xt_register_target(&ip6t_reject_reg); |
259 | } | 261 | } |
260 | 262 | ||
261 | static void __exit ip6t_reject_fini(void) | 263 | static void __exit ip6t_reject_fini(void) |
262 | { | 264 | { |
263 | ip6t_unregister_target(&ip6t_reject_reg); | 265 | xt_unregister_target(&ip6t_reject_reg); |
264 | } | 266 | } |
265 | 267 | ||
266 | module_init(ip6t_reject_init); | 268 | module_init(ip6t_reject_init); |
diff --git a/net/ipv6/netfilter/ip6t_ah.c b/net/ipv6/netfilter/ip6t_ah.c index 46486645eb75..456c76adcbf6 100644 --- a/net/ipv6/netfilter/ip6t_ah.c +++ b/net/ipv6/netfilter/ip6t_ah.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <net/checksum.h> | 15 | #include <net/checksum.h> |
16 | #include <net/ipv6.h> | 16 | #include <net/ipv6.h> |
17 | 17 | ||
18 | #include <linux/netfilter/x_tables.h> | ||
18 | #include <linux/netfilter_ipv6/ip6_tables.h> | 19 | #include <linux/netfilter_ipv6/ip6_tables.h> |
19 | #include <linux/netfilter_ipv6/ip6t_ah.h> | 20 | #include <linux/netfilter_ipv6/ip6t_ah.h> |
20 | 21 | ||
@@ -118,8 +119,9 @@ checkentry(const char *tablename, | |||
118 | return 1; | 119 | return 1; |
119 | } | 120 | } |
120 | 121 | ||
121 | static struct ip6t_match ah_match = { | 122 | static struct xt_match ah_match = { |
122 | .name = "ah", | 123 | .name = "ah", |
124 | .family = AF_INET6, | ||
123 | .match = match, | 125 | .match = match, |
124 | .matchsize = sizeof(struct ip6t_ah), | 126 | .matchsize = sizeof(struct ip6t_ah), |
125 | .checkentry = checkentry, | 127 | .checkentry = checkentry, |
@@ -128,12 +130,12 @@ static struct ip6t_match ah_match = { | |||
128 | 130 | ||
129 | static int __init ip6t_ah_init(void) | 131 | static int __init ip6t_ah_init(void) |
130 | { | 132 | { |
131 | return ip6t_register_match(&ah_match); | 133 | return xt_register_match(&ah_match); |
132 | } | 134 | } |
133 | 135 | ||
134 | static void __exit ip6t_ah_fini(void) | 136 | static void __exit ip6t_ah_fini(void) |
135 | { | 137 | { |
136 | ip6t_unregister_match(&ah_match); | 138 | xt_unregister_match(&ah_match); |
137 | } | 139 | } |
138 | 140 | ||
139 | module_init(ip6t_ah_init); | 141 | module_init(ip6t_ah_init); |
diff --git a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c index 4f6b84c8f4ab..967bed71d4a8 100644 --- a/net/ipv6/netfilter/ip6t_eui64.c +++ b/net/ipv6/netfilter/ip6t_eui64.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/ipv6.h> | 12 | #include <linux/ipv6.h> |
13 | #include <linux/if_ether.h> | 13 | #include <linux/if_ether.h> |
14 | 14 | ||
15 | #include <linux/netfilter/x_tables.h> | ||
15 | #include <linux/netfilter_ipv6/ip6_tables.h> | 16 | #include <linux/netfilter_ipv6/ip6_tables.h> |
16 | 17 | ||
17 | MODULE_DESCRIPTION("IPv6 EUI64 address checking match"); | 18 | MODULE_DESCRIPTION("IPv6 EUI64 address checking match"); |
@@ -61,8 +62,9 @@ match(const struct sk_buff *skb, | |||
61 | return 0; | 62 | return 0; |
62 | } | 63 | } |
63 | 64 | ||
64 | static struct ip6t_match eui64_match = { | 65 | static struct xt_match eui64_match = { |
65 | .name = "eui64", | 66 | .name = "eui64", |
67 | .family = AF_INET6, | ||
66 | .match = match, | 68 | .match = match, |
67 | .matchsize = sizeof(int), | 69 | .matchsize = sizeof(int), |
68 | .hooks = (1 << NF_IP6_PRE_ROUTING) | (1 << NF_IP6_LOCAL_IN) | | 70 | .hooks = (1 << NF_IP6_PRE_ROUTING) | (1 << NF_IP6_LOCAL_IN) | |
@@ -72,12 +74,12 @@ static struct ip6t_match eui64_match = { | |||
72 | 74 | ||
73 | static int __init ip6t_eui64_init(void) | 75 | static int __init ip6t_eui64_init(void) |
74 | { | 76 | { |
75 | return ip6t_register_match(&eui64_match); | 77 | return xt_register_match(&eui64_match); |
76 | } | 78 | } |
77 | 79 | ||
78 | static void __exit ip6t_eui64_fini(void) | 80 | static void __exit ip6t_eui64_fini(void) |
79 | { | 81 | { |
80 | ip6t_unregister_match(&eui64_match); | 82 | xt_unregister_match(&eui64_match); |
81 | } | 83 | } |
82 | 84 | ||
83 | module_init(ip6t_eui64_init); | 85 | module_init(ip6t_eui64_init); |
diff --git a/net/ipv6/netfilter/ip6t_frag.c b/net/ipv6/netfilter/ip6t_frag.c index cd22eaaccdca..5a5da71321b6 100644 --- a/net/ipv6/netfilter/ip6t_frag.c +++ b/net/ipv6/netfilter/ip6t_frag.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <net/checksum.h> | 14 | #include <net/checksum.h> |
15 | #include <net/ipv6.h> | 15 | #include <net/ipv6.h> |
16 | 16 | ||
17 | #include <linux/netfilter/x_tables.h> | ||
17 | #include <linux/netfilter_ipv6/ip6_tables.h> | 18 | #include <linux/netfilter_ipv6/ip6_tables.h> |
18 | #include <linux/netfilter_ipv6/ip6t_frag.h> | 19 | #include <linux/netfilter_ipv6/ip6t_frag.h> |
19 | 20 | ||
@@ -135,8 +136,9 @@ checkentry(const char *tablename, | |||
135 | return 1; | 136 | return 1; |
136 | } | 137 | } |
137 | 138 | ||
138 | static struct ip6t_match frag_match = { | 139 | static struct xt_match frag_match = { |
139 | .name = "frag", | 140 | .name = "frag", |
141 | .family = AF_INET6, | ||
140 | .match = match, | 142 | .match = match, |
141 | .matchsize = sizeof(struct ip6t_frag), | 143 | .matchsize = sizeof(struct ip6t_frag), |
142 | .checkentry = checkentry, | 144 | .checkentry = checkentry, |
@@ -145,12 +147,12 @@ static struct ip6t_match frag_match = { | |||
145 | 147 | ||
146 | static int __init ip6t_frag_init(void) | 148 | static int __init ip6t_frag_init(void) |
147 | { | 149 | { |
148 | return ip6t_register_match(&frag_match); | 150 | return xt_register_match(&frag_match); |
149 | } | 151 | } |
150 | 152 | ||
151 | static void __exit ip6t_frag_fini(void) | 153 | static void __exit ip6t_frag_fini(void) |
152 | { | 154 | { |
153 | ip6t_unregister_match(&frag_match); | 155 | xt_unregister_match(&frag_match); |
154 | } | 156 | } |
155 | 157 | ||
156 | module_init(ip6t_frag_init); | 158 | module_init(ip6t_frag_init); |
diff --git a/net/ipv6/netfilter/ip6t_hbh.c b/net/ipv6/netfilter/ip6t_hbh.c index 3f25babe0440..d2373c7cd354 100644 --- a/net/ipv6/netfilter/ip6t_hbh.c +++ b/net/ipv6/netfilter/ip6t_hbh.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <asm/byteorder.h> | 17 | #include <asm/byteorder.h> |
18 | 18 | ||
19 | #include <linux/netfilter/x_tables.h> | ||
19 | #include <linux/netfilter_ipv6/ip6_tables.h> | 20 | #include <linux/netfilter_ipv6/ip6_tables.h> |
20 | #include <linux/netfilter_ipv6/ip6t_opts.h> | 21 | #include <linux/netfilter_ipv6/ip6t_opts.h> |
21 | 22 | ||
diff --git a/net/ipv6/netfilter/ip6t_hl.c b/net/ipv6/netfilter/ip6t_hl.c index 44a729e17c48..601cc1211c62 100644 --- a/net/ipv6/netfilter/ip6t_hl.c +++ b/net/ipv6/netfilter/ip6t_hl.c | |||
@@ -8,11 +8,12 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/ipv6.h> | ||
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
12 | #include <linux/skbuff.h> | 13 | #include <linux/skbuff.h> |
13 | 14 | ||
14 | #include <linux/netfilter_ipv6/ip6t_hl.h> | 15 | #include <linux/netfilter_ipv6/ip6t_hl.h> |
15 | #include <linux/netfilter_ipv6/ip6_tables.h> | 16 | #include <linux/netfilter/x_tables.h> |
16 | 17 | ||
17 | MODULE_AUTHOR("Maciej Soltysiak <solt@dns.toxicfilms.tv>"); | 18 | MODULE_AUTHOR("Maciej Soltysiak <solt@dns.toxicfilms.tv>"); |
18 | MODULE_DESCRIPTION("IP tables Hop Limit matching module"); | 19 | MODULE_DESCRIPTION("IP tables Hop Limit matching module"); |
@@ -48,8 +49,9 @@ static int match(const struct sk_buff *skb, | |||
48 | return 0; | 49 | return 0; |
49 | } | 50 | } |
50 | 51 | ||
51 | static struct ip6t_match hl_match = { | 52 | static struct xt_match hl_match = { |
52 | .name = "hl", | 53 | .name = "hl", |
54 | .family = AF_INET6, | ||
53 | .match = match, | 55 | .match = match, |
54 | .matchsize = sizeof(struct ip6t_hl_info), | 56 | .matchsize = sizeof(struct ip6t_hl_info), |
55 | .me = THIS_MODULE, | 57 | .me = THIS_MODULE, |
@@ -57,13 +59,12 @@ static struct ip6t_match hl_match = { | |||
57 | 59 | ||
58 | static int __init ip6t_hl_init(void) | 60 | static int __init ip6t_hl_init(void) |
59 | { | 61 | { |
60 | return ip6t_register_match(&hl_match); | 62 | return xt_register_match(&hl_match); |
61 | } | 63 | } |
62 | 64 | ||
63 | static void __exit ip6t_hl_fini(void) | 65 | static void __exit ip6t_hl_fini(void) |
64 | { | 66 | { |
65 | ip6t_unregister_match(&hl_match); | 67 | xt_unregister_match(&hl_match); |
66 | |||
67 | } | 68 | } |
68 | 69 | ||
69 | module_init(ip6t_hl_init); | 70 | module_init(ip6t_hl_init); |
diff --git a/net/ipv6/netfilter/ip6t_ipv6header.c b/net/ipv6/netfilter/ip6t_ipv6header.c index 3093c398002f..26ac084adefc 100644 --- a/net/ipv6/netfilter/ip6t_ipv6header.c +++ b/net/ipv6/netfilter/ip6t_ipv6header.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <net/checksum.h> | 18 | #include <net/checksum.h> |
19 | #include <net/ipv6.h> | 19 | #include <net/ipv6.h> |
20 | 20 | ||
21 | #include <linux/netfilter/x_tables.h> | ||
21 | #include <linux/netfilter_ipv6/ip6_tables.h> | 22 | #include <linux/netfilter_ipv6/ip6_tables.h> |
22 | #include <linux/netfilter_ipv6/ip6t_ipv6header.h> | 23 | #include <linux/netfilter_ipv6/ip6t_ipv6header.h> |
23 | 24 | ||
@@ -140,8 +141,9 @@ ipv6header_checkentry(const char *tablename, | |||
140 | return 1; | 141 | return 1; |
141 | } | 142 | } |
142 | 143 | ||
143 | static struct ip6t_match ip6t_ipv6header_match = { | 144 | static struct xt_match ip6t_ipv6header_match = { |
144 | .name = "ipv6header", | 145 | .name = "ipv6header", |
146 | .family = AF_INET6, | ||
145 | .match = &ipv6header_match, | 147 | .match = &ipv6header_match, |
146 | .matchsize = sizeof(struct ip6t_ipv6header_info), | 148 | .matchsize = sizeof(struct ip6t_ipv6header_info), |
147 | .checkentry = &ipv6header_checkentry, | 149 | .checkentry = &ipv6header_checkentry, |
@@ -151,12 +153,12 @@ static struct ip6t_match ip6t_ipv6header_match = { | |||
151 | 153 | ||
152 | static int __init ipv6header_init(void) | 154 | static int __init ipv6header_init(void) |
153 | { | 155 | { |
154 | return ip6t_register_match(&ip6t_ipv6header_match); | 156 | return xt_register_match(&ip6t_ipv6header_match); |
155 | } | 157 | } |
156 | 158 | ||
157 | static void __exit ipv6header_exit(void) | 159 | static void __exit ipv6header_exit(void) |
158 | { | 160 | { |
159 | ip6t_unregister_match(&ip6t_ipv6header_match); | 161 | xt_unregister_match(&ip6t_ipv6header_match); |
160 | } | 162 | } |
161 | 163 | ||
162 | module_init(ipv6header_init); | 164 | module_init(ipv6header_init); |
diff --git a/net/ipv6/netfilter/ip6t_owner.c b/net/ipv6/netfilter/ip6t_owner.c index 4eb9bbc4ebc3..43738bba00b5 100644 --- a/net/ipv6/netfilter/ip6t_owner.c +++ b/net/ipv6/netfilter/ip6t_owner.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/netfilter_ipv6/ip6t_owner.h> | 17 | #include <linux/netfilter_ipv6/ip6t_owner.h> |
18 | #include <linux/netfilter_ipv6/ip6_tables.h> | 18 | #include <linux/netfilter_ipv6/ip6_tables.h> |
19 | #include <linux/netfilter/x_tables.h> | ||
19 | 20 | ||
20 | MODULE_AUTHOR("Marc Boucher <marc@mbsi.ca>"); | 21 | MODULE_AUTHOR("Marc Boucher <marc@mbsi.ca>"); |
21 | MODULE_DESCRIPTION("IP6 tables owner matching module"); | 22 | MODULE_DESCRIPTION("IP6 tables owner matching module"); |
@@ -69,8 +70,9 @@ checkentry(const char *tablename, | |||
69 | return 1; | 70 | return 1; |
70 | } | 71 | } |
71 | 72 | ||
72 | static struct ip6t_match owner_match = { | 73 | static struct xt_match owner_match = { |
73 | .name = "owner", | 74 | .name = "owner", |
75 | .family = AF_INET6, | ||
74 | .match = match, | 76 | .match = match, |
75 | .matchsize = sizeof(struct ip6t_owner_info), | 77 | .matchsize = sizeof(struct ip6t_owner_info), |
76 | .hooks = (1 << NF_IP6_LOCAL_OUT) | (1 << NF_IP6_POST_ROUTING), | 78 | .hooks = (1 << NF_IP6_LOCAL_OUT) | (1 << NF_IP6_POST_ROUTING), |
@@ -80,12 +82,12 @@ static struct ip6t_match owner_match = { | |||
80 | 82 | ||
81 | static int __init ip6t_owner_init(void) | 83 | static int __init ip6t_owner_init(void) |
82 | { | 84 | { |
83 | return ip6t_register_match(&owner_match); | 85 | return xt_register_match(&owner_match); |
84 | } | 86 | } |
85 | 87 | ||
86 | static void __exit ip6t_owner_fini(void) | 88 | static void __exit ip6t_owner_fini(void) |
87 | { | 89 | { |
88 | ip6t_unregister_match(&owner_match); | 90 | xt_unregister_match(&owner_match); |
89 | } | 91 | } |
90 | 92 | ||
91 | module_init(ip6t_owner_init); | 93 | module_init(ip6t_owner_init); |
diff --git a/net/ipv6/netfilter/ip6t_rt.c b/net/ipv6/netfilter/ip6t_rt.c index 54d7d14134fd..81ab00d8c182 100644 --- a/net/ipv6/netfilter/ip6t_rt.c +++ b/net/ipv6/netfilter/ip6t_rt.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <asm/byteorder.h> | 17 | #include <asm/byteorder.h> |
18 | 18 | ||
19 | #include <linux/netfilter/x_tables.h> | ||
19 | #include <linux/netfilter_ipv6/ip6_tables.h> | 20 | #include <linux/netfilter_ipv6/ip6_tables.h> |
20 | #include <linux/netfilter_ipv6/ip6t_rt.h> | 21 | #include <linux/netfilter_ipv6/ip6t_rt.h> |
21 | 22 | ||
@@ -221,8 +222,9 @@ checkentry(const char *tablename, | |||
221 | return 1; | 222 | return 1; |
222 | } | 223 | } |
223 | 224 | ||
224 | static struct ip6t_match rt_match = { | 225 | static struct xt_match rt_match = { |
225 | .name = "rt", | 226 | .name = "rt", |
227 | .family = AF_INET6, | ||
226 | .match = match, | 228 | .match = match, |
227 | .matchsize = sizeof(struct ip6t_rt), | 229 | .matchsize = sizeof(struct ip6t_rt), |
228 | .checkentry = checkentry, | 230 | .checkentry = checkentry, |
@@ -231,12 +233,12 @@ static struct ip6t_match rt_match = { | |||
231 | 233 | ||
232 | static int __init ip6t_rt_init(void) | 234 | static int __init ip6t_rt_init(void) |
233 | { | 235 | { |
234 | return ip6t_register_match(&rt_match); | 236 | return xt_register_match(&rt_match); |
235 | } | 237 | } |
236 | 238 | ||
237 | static void __exit ip6t_rt_fini(void) | 239 | static void __exit ip6t_rt_fini(void) |
238 | { | 240 | { |
239 | ip6t_unregister_match(&rt_match); | 241 | xt_unregister_match(&rt_match); |
240 | } | 242 | } |
241 | 243 | ||
242 | module_init(ip6t_rt_init); | 244 | module_init(ip6t_rt_init); |