]> err.no Git - linux-2.6/blobdiff - net/ipv4/netfilter.c
Merge branch 'async-tx-for-linus' of git://lost.foo-projects.org/~dwillia2/git/iop...
[linux-2.6] / net / ipv4 / netfilter.c
index 4011f8f987c0e0b9a7656b2aece380c32be60edb..9a904c6c0dc8d0d72244ecac2c53ce49cf68cb65 100644 (file)
@@ -19,7 +19,7 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type)
        unsigned int hh_len;
        unsigned int type;
 
-       type = inet_addr_type(iph->saddr);
+       type = inet_addr_type(&init_net, iph->saddr);
        if (addr_type == RTN_UNSPEC)
                addr_type = type;
 
@@ -33,7 +33,7 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type)
                fl.nl_u.ip4_u.tos = RT_TOS(iph->tos);
                fl.oif = skb->sk ? skb->sk->sk_bound_dev_if : 0;
                fl.mark = skb->mark;
-               if (ip_route_output_key(&rt, &fl) != 0)
+               if (ip_route_output_key(&init_net, &rt, &fl) != 0)
                        return -1;
 
                /* Drop old route. */
@@ -43,7 +43,7 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type)
                /* non-local src, find valid iif to satisfy
                 * rp-filter when calling ip_route_input. */
                fl.nl_u.ip4_u.daddr = iph->saddr;
-               if (ip_route_output_key(&rt, &fl) != 0)
+               if (ip_route_output_key(&init_net, &rt, &fl) != 0)
                        return -1;
 
                odst = skb->dst;
@@ -187,7 +187,7 @@ EXPORT_SYMBOL(nf_ip_checksum);
 
 static int nf_ip_route(struct dst_entry **dst, struct flowi *fl)
 {
-       return ip_route_output_key((struct rtable **)dst, fl);
+       return ip_route_output_key(&init_net, (struct rtable **)dst, fl);
 }
 
 static const struct nf_afinfo nf_ip_afinfo = {
@@ -211,3 +211,13 @@ static void ipv4_netfilter_fini(void)
 
 module_init(ipv4_netfilter_init);
 module_exit(ipv4_netfilter_fini);
+
+#ifdef CONFIG_SYSCTL
+struct ctl_path nf_net_ipv4_netfilter_sysctl_path[] = {
+       { .procname = "net", .ctl_name = CTL_NET, },
+       { .procname = "ipv4", .ctl_name = NET_IPV4, },
+       { .procname = "netfilter", .ctl_name = NET_IPV4_NETFILTER, },
+       { }
+};
+EXPORT_SYMBOL_GPL(nf_net_ipv4_netfilter_sysctl_path);
+#endif /* CONFIG_SYSCTL */