aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@computergmbh.de>2007-12-05 02:24:03 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:55:53 -0500
commitd3c5ee6d545b5372fd525ebe16988a5b6efeceb0 (patch)
tree97efd14cfb818ac5fb56a023efe9217f78ad240f /net/ipv6
parent4c610979576d8778c401a9b1d247ed14f6cee998 (diff)
[NETFILTER]: x_tables: consistent and unique symbol names
Give all Netfilter modules consistent and unique symbol names. Signed-off-by: Jan Engelhardt <jengelh@computergmbh.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/ip6t_HL.c37
-rw-r--r--net/ipv6/netfilter/ip6t_LOG.c36
-rw-r--r--net/ipv6/netfilter/ip6t_REJECT.c37
-rw-r--r--net/ipv6/netfilter/ip6t_ah.c37
-rw-r--r--net/ipv6/netfilter/ip6t_eui64.c28
-rw-r--r--net/ipv6/netfilter/ip6t_frag.c38
-rw-r--r--net/ipv6/netfilter/ip6t_hbh.c42
-rw-r--r--net/ipv6/netfilter/ip6t_hl.c24
-rw-r--r--net/ipv6/netfilter/ip6t_ipv6header.c38
-rw-r--r--net/ipv6/netfilter/ip6t_mh.c37
-rw-r--r--net/ipv6/netfilter/ip6t_owner.c38
-rw-r--r--net/ipv6/netfilter/ip6t_rt.c37
12 files changed, 185 insertions, 244 deletions
diff --git a/net/ipv6/netfilter/ip6t_HL.c b/net/ipv6/netfilter/ip6t_HL.c
index 9afc836fd454..cefb4253711c 100644
--- a/net/ipv6/netfilter/ip6t_HL.c
+++ b/net/ipv6/netfilter/ip6t_HL.c
@@ -18,12 +18,10 @@ MODULE_AUTHOR("Maciej Soltysiak <solt@dns.toxicfilms.tv>");
18MODULE_DESCRIPTION("IP6 tables Hop Limit modification module"); 18MODULE_DESCRIPTION("IP6 tables Hop Limit modification module");
19MODULE_LICENSE("GPL"); 19MODULE_LICENSE("GPL");
20 20
21static unsigned int ip6t_hl_target(struct sk_buff *skb, 21static unsigned int
22 const struct net_device *in, 22hl_tg6(struct sk_buff *skb, const struct net_device *in,
23 const struct net_device *out, 23 const struct net_device *out, unsigned int hooknum,
24 unsigned int hooknum, 24 const struct xt_target *target, const void *targinfo)
25 const struct xt_target *target,
26 const void *targinfo)
27{ 25{
28 struct ipv6hdr *ip6h; 26 struct ipv6hdr *ip6h;
29 const struct ip6t_HL_info *info = targinfo; 27 const struct ip6t_HL_info *info = targinfo;
@@ -58,11 +56,10 @@ static unsigned int ip6t_hl_target(struct sk_buff *skb,
58 return XT_CONTINUE; 56 return XT_CONTINUE;
59} 57}
60 58
61static bool ip6t_hl_checkentry(const char *tablename, 59static bool
62 const void *entry, 60hl_tg6_check(const char *tablename, const void *entry,
63 const struct xt_target *target, 61 const struct xt_target *target, void *targinfo,
64 void *targinfo, 62 unsigned int hook_mask)
65 unsigned int hook_mask)
66{ 63{
67 const struct ip6t_HL_info *info = targinfo; 64 const struct ip6t_HL_info *info = targinfo;
68 65
@@ -79,25 +76,25 @@ static bool ip6t_hl_checkentry(const char *tablename,
79 return true; 76 return true;
80} 77}
81 78
82static struct xt_target ip6t_HL __read_mostly = { 79static struct xt_target hl_tg6_reg __read_mostly = {
83 .name = "HL", 80 .name = "HL",
84 .family = AF_INET6, 81 .family = AF_INET6,
85 .target = ip6t_hl_target, 82 .target = hl_tg6,
86 .targetsize = sizeof(struct ip6t_HL_info), 83 .targetsize = sizeof(struct ip6t_HL_info),
87 .table = "mangle", 84 .table = "mangle",
88 .checkentry = ip6t_hl_checkentry, 85 .checkentry = hl_tg6_check,
89 .me = THIS_MODULE 86 .me = THIS_MODULE
90}; 87};
91 88
92static int __init ip6t_hl_init(void) 89static int __init hl_tg6_init(void)
93{ 90{
94 return xt_register_target(&ip6t_HL); 91 return xt_register_target(&hl_tg6_reg);
95} 92}
96 93
97static void __exit ip6t_hl_fini(void) 94static void __exit hl_tg6_exit(void)
98{ 95{
99 xt_unregister_target(&ip6t_HL); 96 xt_unregister_target(&hl_tg6_reg);
100} 97}
101 98
102module_init(ip6t_hl_init); 99module_init(hl_tg6_init);
103module_exit(ip6t_hl_fini); 100module_exit(hl_tg6_exit);
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index 7a48c342df46..cd51c42727fc 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -431,12 +431,9 @@ ip6t_log_packet(unsigned int pf,
431} 431}
432 432
433static unsigned int 433static unsigned int
434ip6t_log_target(struct sk_buff *skb, 434log_tg6(struct sk_buff *skb, const struct net_device *in,
435 const struct net_device *in, 435 const struct net_device *out, unsigned int hooknum,
436 const struct net_device *out, 436 const struct xt_target *target, const void *targinfo)
437 unsigned int hooknum,
438 const struct xt_target *target,
439 const void *targinfo)
440{ 437{
441 const struct ip6t_log_info *loginfo = targinfo; 438 const struct ip6t_log_info *loginfo = targinfo;
442 struct nf_loginfo li; 439 struct nf_loginfo li;
@@ -450,11 +447,10 @@ ip6t_log_target(struct sk_buff *skb,
450} 447}
451 448
452 449
453static bool ip6t_log_checkentry(const char *tablename, 450static bool
454 const void *entry, 451log_tg6_check(const char *tablename, const void *entry,
455 const struct xt_target *target, 452 const struct xt_target *target, void *targinfo,
456 void *targinfo, 453 unsigned int hook_mask)
457 unsigned int hook_mask)
458{ 454{
459 const struct ip6t_log_info *loginfo = targinfo; 455 const struct ip6t_log_info *loginfo = targinfo;
460 456
@@ -470,12 +466,12 @@ static bool ip6t_log_checkentry(const char *tablename,
470 return true; 466 return true;
471} 467}
472 468
473static struct xt_target ip6t_log_reg __read_mostly = { 469static struct xt_target log_tg6_reg __read_mostly = {
474 .name = "LOG", 470 .name = "LOG",
475 .family = AF_INET6, 471 .family = AF_INET6,
476 .target = ip6t_log_target, 472 .target = log_tg6,
477 .targetsize = sizeof(struct ip6t_log_info), 473 .targetsize = sizeof(struct ip6t_log_info),
478 .checkentry = ip6t_log_checkentry, 474 .checkentry = log_tg6_check,
479 .me = THIS_MODULE, 475 .me = THIS_MODULE,
480}; 476};
481 477
@@ -485,22 +481,22 @@ static struct nf_logger ip6t_logger = {
485 .me = THIS_MODULE, 481 .me = THIS_MODULE,
486}; 482};
487 483
488static int __init ip6t_log_init(void) 484static int __init log_tg6_init(void)
489{ 485{
490 int ret; 486 int ret;
491 487
492 ret = xt_register_target(&ip6t_log_reg); 488 ret = xt_register_target(&log_tg6_reg);
493 if (ret < 0) 489 if (ret < 0)
494 return ret; 490 return ret;
495 nf_log_register(PF_INET6, &ip6t_logger); 491 nf_log_register(PF_INET6, &ip6t_logger);
496 return 0; 492 return 0;
497} 493}
498 494
499static void __exit ip6t_log_fini(void) 495static void __exit log_tg6_exit(void)
500{ 496{
501 nf_log_unregister(&ip6t_logger); 497 nf_log_unregister(&ip6t_logger);
502 xt_unregister_target(&ip6t_log_reg); 498 xt_unregister_target(&log_tg6_reg);
503} 499}
504 500
505module_init(ip6t_log_init); 501module_init(log_tg6_init);
506module_exit(ip6t_log_fini); 502module_exit(log_tg6_exit);
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c
index 960ba1780a9c..a951c2cb6de2 100644
--- a/net/ipv6/netfilter/ip6t_REJECT.c
+++ b/net/ipv6/netfilter/ip6t_REJECT.c
@@ -170,12 +170,10 @@ send_unreach(struct sk_buff *skb_in, unsigned char code, unsigned int hooknum)
170 icmpv6_send(skb_in, ICMPV6_DEST_UNREACH, code, 0, NULL); 170 icmpv6_send(skb_in, ICMPV6_DEST_UNREACH, code, 0, NULL);
171} 171}
172 172
173static unsigned int reject6_target(struct sk_buff *skb, 173static unsigned int
174 const struct net_device *in, 174reject_tg6(struct sk_buff *skb, const struct net_device *in,
175 const struct net_device *out, 175 const struct net_device *out, unsigned int hooknum,
176 unsigned int hooknum, 176 const struct xt_target *target, const void *targinfo)
177 const struct xt_target *target,
178 const void *targinfo)
179{ 177{
180 const struct ip6t_reject_info *reject = targinfo; 178 const struct ip6t_reject_info *reject = targinfo;
181 179
@@ -214,11 +212,10 @@ static unsigned int reject6_target(struct sk_buff *skb,
214 return NF_DROP; 212 return NF_DROP;
215} 213}
216 214
217static bool check(const char *tablename, 215static bool
218 const void *entry, 216reject_tg6_check(const char *tablename, const void *entry,
219 const struct xt_target *target, 217 const struct xt_target *target, void *targinfo,
220 void *targinfo, 218 unsigned int hook_mask)
221 unsigned int hook_mask)
222{ 219{
223 const struct ip6t_reject_info *rejinfo = targinfo; 220 const struct ip6t_reject_info *rejinfo = targinfo;
224 const struct ip6t_entry *e = entry; 221 const struct ip6t_entry *e = entry;
@@ -237,27 +234,27 @@ static bool check(const char *tablename,
237 return true; 234 return true;
238} 235}
239 236
240static struct xt_target ip6t_reject_reg __read_mostly = { 237static struct xt_target reject_tg6_reg __read_mostly = {
241 .name = "REJECT", 238 .name = "REJECT",
242 .family = AF_INET6, 239 .family = AF_INET6,
243 .target = reject6_target, 240 .target = reject_tg6,
244 .targetsize = sizeof(struct ip6t_reject_info), 241 .targetsize = sizeof(struct ip6t_reject_info),
245 .table = "filter", 242 .table = "filter",
246 .hooks = (1 << NF_INET_LOCAL_IN) | (1 << NF_INET_FORWARD) | 243 .hooks = (1 << NF_INET_LOCAL_IN) | (1 << NF_INET_FORWARD) |
247 (1 << NF_INET_LOCAL_OUT), 244 (1 << NF_INET_LOCAL_OUT),
248 .checkentry = check, 245 .checkentry = reject_tg6_check,
249 .me = THIS_MODULE 246 .me = THIS_MODULE
250}; 247};
251 248
252static int __init ip6t_reject_init(void) 249static int __init reject_tg6_init(void)
253{ 250{
254 return xt_register_target(&ip6t_reject_reg); 251 return xt_register_target(&reject_tg6_reg);
255} 252}
256 253
257static void __exit ip6t_reject_fini(void) 254static void __exit reject_tg6_exit(void)
258{ 255{
259 xt_unregister_target(&ip6t_reject_reg); 256 xt_unregister_target(&reject_tg6_reg);
260} 257}
261 258
262module_init(ip6t_reject_init); 259module_init(reject_tg6_init);
263module_exit(ip6t_reject_fini); 260module_exit(reject_tg6_exit);
diff --git a/net/ipv6/netfilter/ip6t_ah.c b/net/ipv6/netfilter/ip6t_ah.c
index 2a25fe25e0e0..f5d08a8c0110 100644
--- a/net/ipv6/netfilter/ip6t_ah.c
+++ b/net/ipv6/netfilter/ip6t_ah.c
@@ -37,14 +37,9 @@ spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert)
37} 37}
38 38
39static bool 39static bool
40match(const struct sk_buff *skb, 40ah_mt6(const struct sk_buff *skb, const struct net_device *in,
41 const struct net_device *in, 41 const struct net_device *out, const struct xt_match *match,
42 const struct net_device *out, 42 const void *matchinfo, int offset, unsigned int protoff, bool *hotdrop)
43 const struct xt_match *match,
44 const void *matchinfo,
45 int offset,
46 unsigned int protoff,
47 bool *hotdrop)
48{ 43{
49 struct ip_auth_hdr _ah; 44 struct ip_auth_hdr _ah;
50 const struct ip_auth_hdr *ah; 45 const struct ip_auth_hdr *ah;
@@ -100,11 +95,9 @@ match(const struct sk_buff *skb,
100 95
101/* Called when user tries to insert an entry of this type. */ 96/* Called when user tries to insert an entry of this type. */
102static bool 97static bool
103checkentry(const char *tablename, 98ah_mt6_check(const char *tablename, const void *entry,
104 const void *entry, 99 const struct xt_match *match, void *matchinfo,
105 const struct xt_match *match, 100 unsigned int hook_mask)
106 void *matchinfo,
107 unsigned int hook_mask)
108{ 101{
109 const struct ip6t_ah *ahinfo = matchinfo; 102 const struct ip6t_ah *ahinfo = matchinfo;
110 103
@@ -115,24 +108,24 @@ checkentry(const char *tablename,
115 return true; 108 return true;
116} 109}
117 110
118static struct xt_match ah_match __read_mostly = { 111static struct xt_match ah_mt6_reg __read_mostly = {
119 .name = "ah", 112 .name = "ah",
120 .family = AF_INET6, 113 .family = AF_INET6,
121 .match = match, 114 .match = ah_mt6,
122 .matchsize = sizeof(struct ip6t_ah), 115 .matchsize = sizeof(struct ip6t_ah),
123 .checkentry = checkentry, 116 .checkentry = ah_mt6_check,
124 .me = THIS_MODULE, 117 .me = THIS_MODULE,
125}; 118};
126 119
127static int __init ip6t_ah_init(void) 120static int __init ah_mt6_init(void)
128{ 121{
129 return xt_register_match(&ah_match); 122 return xt_register_match(&ah_mt6_reg);
130} 123}
131 124
132static void __exit ip6t_ah_fini(void) 125static void __exit ah_mt6_exit(void)
133{ 126{
134 xt_unregister_match(&ah_match); 127 xt_unregister_match(&ah_mt6_reg);
135} 128}
136 129
137module_init(ip6t_ah_init); 130module_init(ah_mt6_init);
138module_exit(ip6t_ah_fini); 131module_exit(ah_mt6_exit);
diff --git a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c
index ff71269579da..dd9e67df9147 100644
--- a/net/ipv6/netfilter/ip6t_eui64.c
+++ b/net/ipv6/netfilter/ip6t_eui64.c
@@ -20,14 +20,10 @@ MODULE_LICENSE("GPL");
20MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>"); 20MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");
21 21
22static bool 22static bool
23match(const struct sk_buff *skb, 23eui64_mt6(const struct sk_buff *skb, const struct net_device *in,
24 const struct net_device *in, 24 const struct net_device *out, const struct xt_match *match,
25 const struct net_device *out, 25 const void *matchinfo, int offset, unsigned int protoff,
26 const struct xt_match *match, 26 bool *hotdrop)
27 const void *matchinfo,
28 int offset,
29 unsigned int protoff,
30 bool *hotdrop)
31{ 27{
32 unsigned char eui64[8]; 28 unsigned char eui64[8];
33 int i = 0; 29 int i = 0;
@@ -62,25 +58,25 @@ match(const struct sk_buff *skb,
62 return false; 58 return false;
63} 59}
64 60
65static struct xt_match eui64_match __read_mostly = { 61static struct xt_match eui64_mt6_reg __read_mostly = {
66 .name = "eui64", 62 .name = "eui64",
67 .family = AF_INET6, 63 .family = AF_INET6,
68 .match = match, 64 .match = eui64_mt6,
69 .matchsize = sizeof(int), 65 .matchsize = sizeof(int),
70 .hooks = (1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_IN) | 66 .hooks = (1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_IN) |
71 (1 << NF_INET_FORWARD), 67 (1 << NF_INET_FORWARD),
72 .me = THIS_MODULE, 68 .me = THIS_MODULE,
73}; 69};
74 70
75static int __init ip6t_eui64_init(void) 71static int __init eui64_mt6_init(void)
76{ 72{
77 return xt_register_match(&eui64_match); 73 return xt_register_match(&eui64_mt6_reg);
78} 74}
79 75
80static void __exit ip6t_eui64_fini(void) 76static void __exit eui64_mt6_exit(void)
81{ 77{
82 xt_unregister_match(&eui64_match); 78 xt_unregister_match(&eui64_mt6_reg);
83} 79}
84 80
85module_init(ip6t_eui64_init); 81module_init(eui64_mt6_init);
86module_exit(ip6t_eui64_fini); 82module_exit(eui64_mt6_exit);
diff --git a/net/ipv6/netfilter/ip6t_frag.c b/net/ipv6/netfilter/ip6t_frag.c
index 968aeba02073..ae8c714a80d5 100644
--- a/net/ipv6/netfilter/ip6t_frag.c
+++ b/net/ipv6/netfilter/ip6t_frag.c
@@ -35,14 +35,10 @@ id_match(u_int32_t min, u_int32_t max, u_int32_t id, bool invert)
35} 35}
36 36
37static bool 37static bool
38match(const struct sk_buff *skb, 38frag_mt6(const struct sk_buff *skb, const struct net_device *in,
39 const struct net_device *in, 39 const struct net_device *out, const struct xt_match *match,
40 const struct net_device *out, 40 const void *matchinfo, int offset, unsigned int protoff,
41 const struct xt_match *match, 41 bool *hotdrop)
42 const void *matchinfo,
43 int offset,
44 unsigned int protoff,
45 bool *hotdrop)
46{ 42{
47 struct frag_hdr _frag; 43 struct frag_hdr _frag;
48 const struct frag_hdr *fh; 44 const struct frag_hdr *fh;
@@ -116,11 +112,9 @@ match(const struct sk_buff *skb,
116 112
117/* Called when user tries to insert an entry of this type. */ 113/* Called when user tries to insert an entry of this type. */
118static bool 114static bool
119checkentry(const char *tablename, 115frag_mt6_check(const char *tablename, const void *ip,
120 const void *ip, 116 const struct xt_match *match, void *matchinfo,
121 const struct xt_match *match, 117 unsigned int hook_mask)
122 void *matchinfo,
123 unsigned int hook_mask)
124{ 118{
125 const struct ip6t_frag *fraginfo = matchinfo; 119 const struct ip6t_frag *fraginfo = matchinfo;
126 120
@@ -131,24 +125,24 @@ checkentry(const char *tablename,
131 return true; 125 return true;
132} 126}
133 127
134static struct xt_match frag_match __read_mostly = { 128static struct xt_match frag_mt6_reg __read_mostly = {
135 .name = "frag", 129 .name = "frag",
136 .family = AF_INET6, 130 .family = AF_INET6,
137 .match = match, 131 .match = frag_mt6,
138 .matchsize = sizeof(struct ip6t_frag), 132 .matchsize = sizeof(struct ip6t_frag),
139 .checkentry = checkentry, 133 .checkentry = frag_mt6_check,
140 .me = THIS_MODULE, 134 .me = THIS_MODULE,
141}; 135};
142 136
143static int __init ip6t_frag_init(void) 137static int __init frag_mt6_init(void)
144{ 138{
145 return xt_register_match(&frag_match); 139 return xt_register_match(&frag_mt6_reg);
146} 140}
147 141
148static void __exit ip6t_frag_fini(void) 142static void __exit frag_mt6_exit(void)
149{ 143{
150 xt_unregister_match(&frag_match); 144 xt_unregister_match(&frag_mt6_reg);
151} 145}
152 146
153module_init(ip6t_frag_init); 147module_init(frag_mt6_init);
154module_exit(ip6t_frag_fini); 148module_exit(frag_mt6_exit);
diff --git a/net/ipv6/netfilter/ip6t_hbh.c b/net/ipv6/netfilter/ip6t_hbh.c
index e6ca6018b1ea..b76e27dc73d2 100644
--- a/net/ipv6/netfilter/ip6t_hbh.c
+++ b/net/ipv6/netfilter/ip6t_hbh.c
@@ -42,14 +42,10 @@ MODULE_ALIAS("ip6t_dst");
42 */ 42 */
43 43
44static bool 44static bool
45match(const struct sk_buff *skb, 45hbh_mt6(const struct sk_buff *skb, const struct net_device *in,
46 const struct net_device *in, 46 const struct net_device *out, const struct xt_match *match,
47 const struct net_device *out, 47 const void *matchinfo, int offset, unsigned int protoff,
48 const struct xt_match *match, 48 bool *hotdrop)
49 const void *matchinfo,
50 int offset,
51 unsigned int protoff,
52 bool *hotdrop)
53{ 49{
54 struct ipv6_opt_hdr _optsh; 50 struct ipv6_opt_hdr _optsh;
55 const struct ipv6_opt_hdr *oh; 51 const struct ipv6_opt_hdr *oh;
@@ -171,11 +167,9 @@ match(const struct sk_buff *skb,
171 167
172/* Called when user tries to insert an entry of this type. */ 168/* Called when user tries to insert an entry of this type. */
173static bool 169static bool
174checkentry(const char *tablename, 170hbh_mt6_check(const char *tablename, const void *entry,
175 const void *entry, 171 const struct xt_match *match, void *matchinfo,
176 const struct xt_match *match, 172 unsigned int hook_mask)
177 void *matchinfo,
178 unsigned int hook_mask)
179{ 173{
180 const struct ip6t_opts *optsinfo = matchinfo; 174 const struct ip6t_opts *optsinfo = matchinfo;
181 175
@@ -186,36 +180,36 @@ checkentry(const char *tablename,
186 return true; 180 return true;
187} 181}
188 182
189static struct xt_match opts_match[] __read_mostly = { 183static struct xt_match hbh_mt6_reg[] __read_mostly = {
190 { 184 {
191 .name = "hbh", 185 .name = "hbh",
192 .family = AF_INET6, 186 .family = AF_INET6,
193 .match = match, 187 .match = hbh_mt6,
194 .matchsize = sizeof(struct ip6t_opts), 188 .matchsize = sizeof(struct ip6t_opts),
195 .checkentry = checkentry, 189 .checkentry = hbh_mt6_check,
196 .me = THIS_MODULE, 190 .me = THIS_MODULE,
197 .data = NEXTHDR_HOP, 191 .data = NEXTHDR_HOP,
198 }, 192 },
199 { 193 {
200 .name = "dst", 194 .name = "dst",
201 .family = AF_INET6, 195 .family = AF_INET6,
202 .match = match, 196 .match = hbh_mt6,
203 .matchsize = sizeof(struct ip6t_opts), 197 .matchsize = sizeof(struct ip6t_opts),
204 .checkentry = checkentry, 198 .checkentry = hbh_mt6_check,
205 .me = THIS_MODULE, 199 .me = THIS_MODULE,
206 .data = NEXTHDR_DEST, 200 .data = NEXTHDR_DEST,
207 }, 201 },
208}; 202};
209 203
210static int __init ip6t_hbh_init(void) 204static int __init hbh_mt6_init(void)
211{ 205{
212 return xt_register_matches(opts_match, ARRAY_SIZE(opts_match)); 206 return xt_register_matches(hbh_mt6_reg, ARRAY_SIZE(hbh_mt6_reg));
213} 207}
214 208
215static void __exit ip6t_hbh_fini(void) 209static void __exit hbh_mt6_exit(void)
216{ 210{
217 xt_unregister_matches(opts_match, ARRAY_SIZE(opts_match)); 211 xt_unregister_matches(hbh_mt6_reg, ARRAY_SIZE(hbh_mt6_reg));
218} 212}
219 213
220module_init(ip6t_hbh_init); 214module_init(hbh_mt6_init);
221module_exit(ip6t_hbh_fini); 215module_exit(hbh_mt6_exit);
diff --git a/net/ipv6/netfilter/ip6t_hl.c b/net/ipv6/netfilter/ip6t_hl.c
index ca29ec00dc18..8f2d7d0ab40e 100644
--- a/net/ipv6/netfilter/ip6t_hl.c
+++ b/net/ipv6/netfilter/ip6t_hl.c
@@ -19,10 +19,10 @@ MODULE_AUTHOR("Maciej Soltysiak <solt@dns.toxicfilms.tv>");
19MODULE_DESCRIPTION("IP tables Hop Limit matching module"); 19MODULE_DESCRIPTION("IP tables Hop Limit matching module");
20MODULE_LICENSE("GPL"); 20MODULE_LICENSE("GPL");
21 21
22static bool match(const struct sk_buff *skb, 22static bool
23 const struct net_device *in, const struct net_device *out, 23hl_mt6(const struct sk_buff *skb, const struct net_device *in,
24 const struct xt_match *match, const void *matchinfo, 24 const struct net_device *out, const struct xt_match *match,
25 int offset, unsigned int protoff, bool *hotdrop) 25 const void *matchinfo, int offset, unsigned int protoff, bool *hotdrop)
26{ 26{
27 const struct ip6t_hl_info *info = matchinfo; 27 const struct ip6t_hl_info *info = matchinfo;
28 const struct ipv6hdr *ip6h = ipv6_hdr(skb); 28 const struct ipv6hdr *ip6h = ipv6_hdr(skb);
@@ -49,23 +49,23 @@ static bool match(const struct sk_buff *skb,
49 return false; 49 return false;
50} 50}
51 51
52static struct xt_match hl_match __read_mostly = { 52static struct xt_match hl_mt6_reg __read_mostly = {
53 .name = "hl", 53 .name = "hl",
54 .family = AF_INET6, 54 .family = AF_INET6,
55 .match = match, 55 .match = hl_mt6,
56 .matchsize = sizeof(struct ip6t_hl_info), 56 .matchsize = sizeof(struct ip6t_hl_info),
57 .me = THIS_MODULE, 57 .me = THIS_MODULE,
58}; 58};
59 59
60static int __init ip6t_hl_init(void) 60static int __init hl_mt6_init(void)
61{ 61{
62 return xt_register_match(&hl_match); 62 return xt_register_match(&hl_mt6_reg);
63} 63}
64 64
65static void __exit ip6t_hl_fini(void) 65static void __exit hl_mt6_exit(void)
66{ 66{
67 xt_unregister_match(&hl_match); 67 xt_unregister_match(&hl_mt6_reg);
68} 68}
69 69
70module_init(ip6t_hl_init); 70module_init(hl_mt6_init);
71module_exit(ip6t_hl_fini); 71module_exit(hl_mt6_exit);
diff --git a/net/ipv6/netfilter/ip6t_ipv6header.c b/net/ipv6/netfilter/ip6t_ipv6header.c
index 2c65c2f9a4ab..ae497e7ac11b 100644
--- a/net/ipv6/netfilter/ip6t_ipv6header.c
+++ b/net/ipv6/netfilter/ip6t_ipv6header.c
@@ -27,14 +27,10 @@ MODULE_DESCRIPTION("IPv6 headers match");
27MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>"); 27MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");
28 28
29static bool 29static bool
30ipv6header_match(const struct sk_buff *skb, 30ipv6header_mt6(const struct sk_buff *skb, const struct net_device *in,
31 const struct net_device *in, 31 const struct net_device *out, const struct xt_match *match,
32 const struct net_device *out, 32 const void *matchinfo, int offset, unsigned int protoff,
33 const struct xt_match *match, 33 bool *hotdrop)
34 const void *matchinfo,
35 int offset,
36 unsigned int protoff,
37 bool *hotdrop)
38{ 34{
39 const struct ip6t_ipv6header_info *info = matchinfo; 35 const struct ip6t_ipv6header_info *info = matchinfo;
40 unsigned int temp; 36 unsigned int temp;
@@ -125,11 +121,9 @@ ipv6header_match(const struct sk_buff *skb,
125} 121}
126 122
127static bool 123static bool
128ipv6header_checkentry(const char *tablename, 124ipv6header_mt6_check(const char *tablename, const void *ip,
129 const void *ip, 125 const struct xt_match *match, void *matchinfo,
130 const struct xt_match *match, 126 unsigned int hook_mask)
131 void *matchinfo,
132 unsigned int hook_mask)
133{ 127{
134 const struct ip6t_ipv6header_info *info = matchinfo; 128 const struct ip6t_ipv6header_info *info = matchinfo;
135 129
@@ -141,25 +135,25 @@ ipv6header_checkentry(const char *tablename,
141 return true; 135 return true;
142} 136}
143 137
144static struct xt_match ip6t_ipv6header_match __read_mostly = { 138static struct xt_match ipv6header_mt6_reg __read_mostly = {
145 .name = "ipv6header", 139 .name = "ipv6header",
146 .family = AF_INET6, 140 .family = AF_INET6,
147 .match = &ipv6header_match, 141 .match = ipv6header_mt6,
148 .matchsize = sizeof(struct ip6t_ipv6header_info), 142 .matchsize = sizeof(struct ip6t_ipv6header_info),
149 .checkentry = &ipv6header_checkentry, 143 .checkentry = ipv6header_mt6_check,
150 .destroy = NULL, 144 .destroy = NULL,
151 .me = THIS_MODULE, 145 .me = THIS_MODULE,
152}; 146};
153 147
154static int __init ipv6header_init(void) 148static int __init ipv6header_mt6_init(void)
155{ 149{
156 return xt_register_match(&ip6t_ipv6header_match); 150 return xt_register_match(&ipv6header_mt6_reg);
157} 151}
158 152
159static void __exit ipv6header_exit(void) 153static void __exit ipv6header_mt6_exit(void)
160{ 154{
161 xt_unregister_match(&ip6t_ipv6header_match); 155 xt_unregister_match(&ipv6header_mt6_reg);
162} 156}
163 157
164module_init(ipv6header_init); 158module_init(ipv6header_mt6_init);
165module_exit(ipv6header_exit); 159module_exit(ipv6header_mt6_exit);
diff --git a/net/ipv6/netfilter/ip6t_mh.c b/net/ipv6/netfilter/ip6t_mh.c
index 0fa714092dc9..618e6b94b033 100644
--- a/net/ipv6/netfilter/ip6t_mh.c
+++ b/net/ipv6/netfilter/ip6t_mh.c
@@ -38,14 +38,9 @@ type_match(u_int8_t min, u_int8_t max, u_int8_t type, bool invert)
38} 38}
39 39
40static bool 40static bool
41match(const struct sk_buff *skb, 41mh_mt6(const struct sk_buff *skb, const struct net_device *in,
42 const struct net_device *in, 42 const struct net_device *out, const struct xt_match *match,
43 const struct net_device *out, 43 const void *matchinfo, int offset, unsigned int protoff, bool *hotdrop)
44 const struct xt_match *match,
45 const void *matchinfo,
46 int offset,
47 unsigned int protoff,
48 bool *hotdrop)
49{ 44{
50 struct ip6_mh _mh; 45 struct ip6_mh _mh;
51 const struct ip6_mh *mh; 46 const struct ip6_mh *mh;
@@ -77,11 +72,9 @@ match(const struct sk_buff *skb,
77 72
78/* Called when user tries to insert an entry of this type. */ 73/* Called when user tries to insert an entry of this type. */
79static bool 74static bool
80mh_checkentry(const char *tablename, 75mh_mt6_check(const char *tablename, const void *entry,
81 const void *entry, 76 const struct xt_match *match, void *matchinfo,
82 const struct xt_match *match, 77 unsigned int hook_mask)
83 void *matchinfo,
84 unsigned int hook_mask)
85{ 78{
86 const struct ip6t_mh *mhinfo = matchinfo; 79 const struct ip6t_mh *mhinfo = matchinfo;
87 80
@@ -89,25 +82,25 @@ mh_checkentry(const char *tablename,
89 return !(mhinfo->invflags & ~IP6T_MH_INV_MASK); 82 return !(mhinfo->invflags & ~IP6T_MH_INV_MASK);
90} 83}
91 84
92static struct xt_match mh_match __read_mostly = { 85static struct xt_match mh_mt6_reg __read_mostly = {
93 .name = "mh", 86 .name = "mh",
94 .family = AF_INET6, 87 .family = AF_INET6,
95 .checkentry = mh_checkentry, 88 .checkentry = mh_mt6_check,
96 .match = match, 89 .match = mh_mt6,
97 .matchsize = sizeof(struct ip6t_mh), 90 .matchsize = sizeof(struct ip6t_mh),
98 .proto = IPPROTO_MH, 91 .proto = IPPROTO_MH,
99 .me = THIS_MODULE, 92 .me = THIS_MODULE,
100}; 93};
101 94
102static int __init ip6t_mh_init(void) 95static int __init mh_mt6_init(void)
103{ 96{
104 return xt_register_match(&mh_match); 97 return xt_register_match(&mh_mt6_reg);
105} 98}
106 99
107static void __exit ip6t_mh_fini(void) 100static void __exit mh_mt6_exit(void)
108{ 101{
109 xt_unregister_match(&mh_match); 102 xt_unregister_match(&mh_mt6_reg);
110} 103}
111 104
112module_init(ip6t_mh_init); 105module_init(mh_mt6_init);
113module_exit(ip6t_mh_fini); 106module_exit(mh_mt6_exit);
diff --git a/net/ipv6/netfilter/ip6t_owner.c b/net/ipv6/netfilter/ip6t_owner.c
index 1e0dc4a972cf..6a52ed985166 100644
--- a/net/ipv6/netfilter/ip6t_owner.c
+++ b/net/ipv6/netfilter/ip6t_owner.c
@@ -24,14 +24,10 @@ MODULE_LICENSE("GPL");
24 24
25 25
26static bool 26static bool
27match(const struct sk_buff *skb, 27owner_mt6(const struct sk_buff *skb, const struct net_device *in,
28 const struct net_device *in, 28 const struct net_device *out, const struct xt_match *match,
29 const struct net_device *out, 29 const void *matchinfo, int offset, unsigned int protoff,
30 const struct xt_match *match, 30 bool *hotdrop)
31 const void *matchinfo,
32 int offset,
33 unsigned int protoff,
34 bool *hotdrop)
35{ 31{
36 const struct ip6t_owner_info *info = matchinfo; 32 const struct ip6t_owner_info *info = matchinfo;
37 33
@@ -52,11 +48,9 @@ match(const struct sk_buff *skb,
52} 48}
53 49
54static bool 50static bool
55checkentry(const char *tablename, 51owner_mt6_check(const char *tablename, const void *ip,
56 const void *ip, 52 const struct xt_match *match, void *matchinfo,
57 const struct xt_match *match, 53 unsigned int hook_mask)
58 void *matchinfo,
59 unsigned int hook_mask)
60{ 54{
61 const struct ip6t_owner_info *info = matchinfo; 55 const struct ip6t_owner_info *info = matchinfo;
62 56
@@ -68,26 +62,26 @@ checkentry(const char *tablename,
68 return true; 62 return true;
69} 63}
70 64
71static struct xt_match owner_match __read_mostly = { 65static struct xt_match owner_mt6_reg __read_mostly = {
72 .name = "owner", 66 .name = "owner",
73 .family = AF_INET6, 67 .family = AF_INET6,
74 .match = match, 68 .match = owner_mt6,
75 .matchsize = sizeof(struct ip6t_owner_info), 69 .matchsize = sizeof(struct ip6t_owner_info),
76 .hooks = (1 << NF_INET_LOCAL_OUT) | 70 .hooks = (1 << NF_INET_LOCAL_OUT) |
77 (1 << NF_INET_POST_ROUTING), 71 (1 << NF_INET_POST_ROUTING),
78 .checkentry = checkentry, 72 .checkentry = owner_mt6_check,
79 .me = THIS_MODULE, 73 .me = THIS_MODULE,
80}; 74};
81 75
82static int __init ip6t_owner_init(void) 76static int __init owner_mt6_init(void)
83{ 77{
84 return xt_register_match(&owner_match); 78 return xt_register_match(&owner_mt6_reg);
85} 79}
86 80
87static void __exit ip6t_owner_fini(void) 81static void __exit owner_mt6_exit(void)
88{ 82{
89 xt_unregister_match(&owner_match); 83 xt_unregister_match(&owner_mt6_reg);
90} 84}
91 85
92module_init(ip6t_owner_init); 86module_init(owner_mt6_init);
93module_exit(ip6t_owner_fini); 87module_exit(owner_mt6_exit);
diff --git a/net/ipv6/netfilter/ip6t_rt.c b/net/ipv6/netfilter/ip6t_rt.c
index 357cea703bd9..038cea6407d0 100644
--- a/net/ipv6/netfilter/ip6t_rt.c
+++ b/net/ipv6/netfilter/ip6t_rt.c
@@ -37,14 +37,9 @@ segsleft_match(u_int32_t min, u_int32_t max, u_int32_t id, bool invert)
37} 37}
38 38
39static bool 39static bool
40match(const struct sk_buff *skb, 40rt_mt6(const struct sk_buff *skb, const struct net_device *in,
41 const struct net_device *in, 41 const struct net_device *out, const struct xt_match *match,
42 const struct net_device *out, 42 const void *matchinfo, int offset, unsigned int protoff, bool *hotdrop)
43 const struct xt_match *match,
44 const void *matchinfo,
45 int offset,
46 unsigned int protoff,
47 bool *hotdrop)
48{ 43{
49 struct ipv6_rt_hdr _route; 44 struct ipv6_rt_hdr _route;
50 const struct ipv6_rt_hdr *rh; 45 const struct ipv6_rt_hdr *rh;
@@ -195,11 +190,9 @@ match(const struct sk_buff *skb,
195 190
196/* Called when user tries to insert an entry of this type. */ 191/* Called when user tries to insert an entry of this type. */
197static bool 192static bool
198checkentry(const char *tablename, 193rt_mt6_check(const char *tablename, const void *entry,
199 const void *entry, 194 const struct xt_match *match, void *matchinfo,
200 const struct xt_match *match, 195 unsigned int hook_mask)
201 void *matchinfo,
202 unsigned int hook_mask)
203{ 196{
204 const struct ip6t_rt *rtinfo = matchinfo; 197 const struct ip6t_rt *rtinfo = matchinfo;
205 198
@@ -218,24 +211,24 @@ checkentry(const char *tablename,
218 return true; 211 return true;
219} 212}
220 213
221static struct xt_match rt_match __read_mostly = { 214static struct xt_match rt_mt6_reg __read_mostly = {
222 .name = "rt", 215 .name = "rt",
223 .family = AF_INET6, 216 .family = AF_INET6,
224 .match = match, 217 .match = rt_mt6,
225 .matchsize = sizeof(struct ip6t_rt), 218 .matchsize = sizeof(struct ip6t_rt),
226 .checkentry = checkentry, 219 .checkentry = rt_mt6_check,
227 .me = THIS_MODULE, 220 .me = THIS_MODULE,
228}; 221};
229 222
230static int __init ip6t_rt_init(void) 223static int __init rt_mt6_init(void)
231{ 224{
232 return xt_register_match(&rt_match); 225 return xt_register_match(&rt_mt6_reg);
233} 226}
234 227
235static void __exit ip6t_rt_fini(void) 228static void __exit rt_mt6_exit(void)
236{ 229{
237 xt_unregister_match(&rt_match); 230 xt_unregister_match(&rt_mt6_reg);
238} 231}
239 232
240module_init(ip6t_rt_init); 233module_init(rt_mt6_init);
241module_exit(ip6t_rt_fini); 234module_exit(rt_mt6_exit);