git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
net
/
ipv6
/
netfilter
/
ip6table_raw.c
diff --git
a/net/ipv6/netfilter/ip6table_raw.c
b/net/ipv6/netfilter/ip6table_raw.c
index
71407be
..
b4154da
100644
(file)
--- a/
net/ipv6/netfilter/ip6table_raw.c
+++ b/
net/ipv6/netfilter/ip6table_raw.c
@@
-106,11
+106,12
@@
static struct
}
};
}
};
-static struct
ip6
t_table packet_raw = {
+static struct
x
t_table packet_raw = {
.name = "raw",
.valid_hooks = RAW_VALID_HOOKS,
.lock = RW_LOCK_UNLOCKED,
.name = "raw",
.valid_hooks = RAW_VALID_HOOKS,
.lock = RW_LOCK_UNLOCKED,
- .me = THIS_MODULE
+ .me = THIS_MODULE,
+ .af = AF_INET6,
};
/* The work comes in here from netfilter.c. */
};
/* The work comes in here from netfilter.c. */
@@
-121,7
+122,7
@@
ip6t_hook(unsigned int hook,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
- return ip6t_do_table(pskb, hook, in, out, &packet_raw
, NULL
);
+ return ip6t_do_table(pskb, hook, in, out, &packet_raw);
}
static struct nf_hook_ops ip6t_ops[] = {
}
static struct nf_hook_ops ip6t_ops[] = {
@@
-129,17
+130,19
@@
static struct nf_hook_ops ip6t_ops[] = {
.hook = ip6t_hook,
.pf = PF_INET6,
.hooknum = NF_IP6_PRE_ROUTING,
.hook = ip6t_hook,
.pf = PF_INET6,
.hooknum = NF_IP6_PRE_ROUTING,
- .priority = NF_IP6_PRI_FIRST
+ .priority = NF_IP6_PRI_FIRST,
+ .owner = THIS_MODULE,
},
{
.hook = ip6t_hook,
.pf = PF_INET6,
.hooknum = NF_IP6_LOCAL_OUT,
},
{
.hook = ip6t_hook,
.pf = PF_INET6,
.hooknum = NF_IP6_LOCAL_OUT,
- .priority = NF_IP6_PRI_FIRST
+ .priority = NF_IP6_PRI_FIRST,
+ .owner = THIS_MODULE,
},
};
},
};
-static int __init init(void)
+static int __init i
p6table_raw_i
nit(void)
{
int ret;
{
int ret;
@@
-149,34
+152,23
@@
static int __init init(void)
return ret;
/* Register hooks */
return ret;
/* Register hooks */
- ret = nf_register_hook
(&ip6t_ops[0]
);
+ ret = nf_register_hook
s(ip6t_ops, ARRAY_SIZE(ip6t_ops)
);
if (ret < 0)
goto cleanup_table;
if (ret < 0)
goto cleanup_table;
- ret = nf_register_hook(&ip6t_ops[1]);
- if (ret < 0)
- goto cleanup_hook0;
-
return ret;
return ret;
- cleanup_hook0:
- nf_unregister_hook(&ip6t_ops[0]);
cleanup_table:
ip6t_unregister_table(&packet_raw);
cleanup_table:
ip6t_unregister_table(&packet_raw);
-
return ret;
}
return ret;
}
-static void __exit fini(void)
+static void __exit
ip6table_raw_
fini(void)
{
{
- unsigned int i;
-
- for (i = 0; i < sizeof(ip6t_ops)/sizeof(struct nf_hook_ops); i++)
- nf_unregister_hook(&ip6t_ops[i]);
-
+ nf_unregister_hooks(ip6t_ops, ARRAY_SIZE(ip6t_ops));
ip6t_unregister_table(&packet_raw);
}
ip6t_unregister_table(&packet_raw);
}
-module_init(init);
-module_exit(fini);
+module_init(i
p6table_raw_i
nit);
+module_exit(
ip6table_raw_
fini);
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");