]> err.no Git - linux-2.6/blobdiff - net/bridge/br_netfilter.c
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6] / net / bridge / br_netfilter.c
index 859fe4d866985511af52a65890362bae5b11cf27..af7e8be8d8d2e85ffc853ea6c04163b7bd36c92d 100644 (file)
@@ -110,7 +110,8 @@ static inline __be16 pppoe_proto(const struct sk_buff *skb)
  * ipt_REJECT needs it.  Future netfilter modules might
  * require us to fill additional fields. */
 static struct net_device __fake_net_device = {
-       .hard_header_len        = ETH_HLEN
+       .hard_header_len        = ETH_HLEN,
+       .nd_net                 = &init_net,
 };
 
 static struct rtable __fake_rtable = {
@@ -353,7 +354,7 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
                        if (err != -EHOSTUNREACH || !in_dev || IN_DEV_FORWARD(in_dev))
                                goto free_skb;
 
-                       if (!ip_route_output_key(&rt, &fl)) {
+                       if (!ip_route_output_key(&init_net, &rt, &fl)) {
                                /* - Bridged-and-DNAT'ed traffic doesn't
                                 *   require ip_forwarding. */
                                if (((struct dst_entry *)rt)->dev == dev) {
@@ -828,10 +829,6 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff *skb,
        nf_bridge_pull_encap_header(skb);
        nf_bridge_save_header(skb);
 
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
-       if (nf_bridge->netoutdev)
-               realoutdev = nf_bridge->netoutdev;
-#endif
        NF_HOOK(pf, NF_INET_POST_ROUTING, skb, NULL, realoutdev,
                br_nf_dev_queue_xmit);
 
@@ -967,24 +964,10 @@ static ctl_table brnf_table[] = {
        { .ctl_name = 0 }
 };
 
-static ctl_table brnf_bridge_table[] = {
-       {
-               .ctl_name       = NET_BRIDGE,
-               .procname       = "bridge",
-               .mode           = 0555,
-               .child          = brnf_table,
-       },
-       { .ctl_name = 0 }
-};
-
-static ctl_table brnf_net_table[] = {
-       {
-               .ctl_name       = CTL_NET,
-               .procname       = "net",
-               .mode           = 0555,
-               .child          = brnf_bridge_table,
-       },
-       { .ctl_name = 0 }
+static struct ctl_path brnf_path[] = {
+       { .procname = "net", .ctl_name = CTL_NET, },
+       { .procname = "bridge", .ctl_name = NET_BRIDGE, },
+       { }
 };
 #endif
 
@@ -996,7 +979,7 @@ int __init br_netfilter_init(void)
        if (ret < 0)
                return ret;
 #ifdef CONFIG_SYSCTL
-       brnf_sysctl_header = register_sysctl_table(brnf_net_table);
+       brnf_sysctl_header = register_sysctl_paths(brnf_path, brnf_table);
        if (brnf_sysctl_header == NULL) {
                printk(KERN_WARNING
                       "br_netfilter: can't register to sysctl.\n");