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
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
net
/
ipv6
/
netfilter
/
ip6t_owner.c
diff --git
a/net/ipv6/netfilter/ip6t_owner.c
b/net/ipv6/netfilter/ip6t_owner.c
index
5d04799
..
8c8a4c7
100644
(file)
--- a/
net/ipv6/netfilter/ip6t_owner.c
+++ b/
net/ipv6/netfilter/ip6t_owner.c
@@
-26,7
+26,6
@@
static int
match(const struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
match(const struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
- const struct xt_match *match,
const void *matchinfo,
int offset,
unsigned int protoff,
const void *matchinfo,
int offset,
unsigned int protoff,
@@
-55,39
+54,46
@@
match(const struct sk_buff *skb,
static int
checkentry(const char *tablename,
const void *ip,
static int
checkentry(const char *tablename,
const void *ip,
- const struct xt_match *match,
void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask)
{
const struct ip6t_owner_info *info = matchinfo;
void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask)
{
const struct ip6t_owner_info *info = matchinfo;
+ if (hook_mask
+ & ~((1 << NF_IP6_LOCAL_OUT) | (1 << NF_IP6_POST_ROUTING))) {
+ printk("ip6t_owner: only valid for LOCAL_OUT or POST_ROUTING.\n");
+ return 0;
+ }
+
+ if (matchsize != IP6T_ALIGN(sizeof(struct ip6t_owner_info)))
+ return 0;
+
if (info->match & (IP6T_OWNER_PID | IP6T_OWNER_SID)) {
printk("ipt_owner: pid and sid matching "
"not supported anymore\n");
return 0;
}
if (info->match & (IP6T_OWNER_PID | IP6T_OWNER_SID)) {
printk("ipt_owner: pid and sid matching "
"not supported anymore\n");
return 0;
}
+
return 1;
}
static struct ip6t_match owner_match = {
.name = "owner",
return 1;
}
static struct ip6t_match owner_match = {
.name = "owner",
- .match = match,
- .matchsize = sizeof(struct ip6t_owner_info),
- .hooks = (1 << NF_IP6_LOCAL_OUT) | (1 << NF_IP6_POST_ROUTING),
- .checkentry = checkentry,
+ .match = &match,
+ .checkentry = &checkentry,
.me = THIS_MODULE,
};
.me = THIS_MODULE,
};
-static int __init i
p6t_owner_i
nit(void)
+static int __init init(void)
{
return ip6t_register_match(&owner_match);
}
{
return ip6t_register_match(&owner_match);
}
-static void __exit
ip6t_owner_
fini(void)
+static void __exit fini(void)
{
ip6t_unregister_match(&owner_match);
}
{
ip6t_unregister_match(&owner_match);
}
-module_init(i
p6t_owner_i
nit);
-module_exit(
ip6t_owner_
fini);
+module_init(init);
+module_exit(fini);