Skip to contentSkip to conversation

netfilter: netnsize ip6table_security

PATCH Applied Alexey Dobriyan 2 participants 2 messages Jun 10, 2008 – Jun 11, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: netnsize ip6table_security

---

not sure why this code in IPv4 version but not in IPv6

 net/ipv6/netfilter/ip6table_security.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
net/ipv6/netfilter/ip6table_security.c +3 -3
@@ -72,7 +72,7 @@ ip6t_local_in_hook(unsigned int hook,
 		   int (*okfn)(struct sk_buff *))
 {
 	return ip6t_do_table(skb, hook, in, out,
-			     init_net.ipv6.ip6table_security);
+			     nf_local_in_net(in, out)->ipv6.ip6table_security);
 }
 
 static unsigned int
@@ -83,7 +83,7 @@ ip6t_forward_hook(unsigned int hook,
 		  int (*okfn)(struct sk_buff *))
 {
 	return ip6t_do_table(skb, hook, in, out,
-			     init_net.ipv6.ip6table_security);
+			     nf_forward_net(in, out)->ipv6.ip6table_security);
 }
 
 static unsigned int
@@ -95,7 +95,7 @@ ip6t_local_out_hook(unsigned int hook,
 {
 	/* TBD: handle short packets via raw socket */
 	return ip6t_do_table(skb, hook, in, out,
-			     init_net.ipv6.ip6table_security);
+			     nf_local_out_net(in, out)->ipv6.ip6table_security);
 }
 
 static struct nf_hook_ops ip6t_ops[] __read_mostly = {
#1 lore raw
Quoted 7 lines · Alexey Dobriyan

---

not sure why this code in IPv4 version but not in IPv6

 net/ipv6/netfilter/ip6table_security.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied, but I couldn't figure out what "netnsize ip6table_security" is supposed to mean, so I changed it to

"netfilter: use correct namespace in ip6table_security".