]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv4/route.c
[NETNS]: Add namespace parameter to __ip_route_output_key.
[net-next-2.6.git] / net / ipv4 / route.c
index 0576ff79c550a69d152f6a33a2fe6450d28a4ca5..971ab0253a09d627de822b16f4b799addc19fbb2 100644 (file)
@@ -2443,7 +2443,8 @@ make_route:
 out:   return err;
 }
 
-int __ip_route_output_key(struct rtable **rp, const struct flowi *flp)
+int __ip_route_output_key(struct net *net, struct rtable **rp,
+                         const struct flowi *flp)
 {
        unsigned hash;
        struct rtable *rth;
@@ -2470,7 +2471,7 @@ int __ip_route_output_key(struct rtable **rp, const struct flowi *flp)
        }
        rcu_read_unlock_bh();
 
-       return ip_route_output_slow(&init_net, rp, flp);
+       return ip_route_output_slow(net, rp, flp);
 }
 
 EXPORT_SYMBOL_GPL(__ip_route_output_key);
@@ -2536,7 +2537,7 @@ int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk,
 {
        int err;
 
-       if ((err = __ip_route_output_key(rp, flp)) != 0)
+       if ((err = __ip_route_output_key(&init_net, rp, flp)) != 0)
                return err;
 
        if (flp->proto) {