netfilter: xtables: compact table hook functions (2/2)
[deliverable/linux.git] / net / ipv6 / netfilter / ip6table_security.c
index 835858929358f0ba86bb5341e0f380e4429d9545..841ea77f521814d993220e53038caa3c8fa985af 100644 (file)
@@ -69,13 +69,9 @@ ip6table_security_hook(unsigned int hook, struct sk_buff *skb,
                       const struct net_device *out,
                       int (*okfn)(struct sk_buff *))
 {
-       if (hook == NF_INET_LOCAL_OUT)
-               return ip6t_do_table(skb, hook, in, out,
-                                    dev_net(out)->ipv6.ip6table_security);
+       const struct net *net = dev_net((in != NULL) ? in : out);
 
-       /* INPUT/FORWARD: */
-       return ip6t_do_table(skb, hook, in, out,
-                            dev_net(in)->ipv6.ip6table_security);
+       return ip6t_do_table(skb, hook, in, out, net->ipv6.ip6table_security);
 }
 
 static struct nf_hook_ops ip6t_ops[] __read_mostly = {
This page took 0.027922 seconds and 5 git commands to generate.