]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/route.h
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
[linux-2.6-omap-h63xx.git] / include / net / route.h
index eadad590142992fdcf3ae92f49a624821ec3d275..c6338802e8f11a4f727b4a45959dcb32725c6760 100644 (file)
@@ -34,7 +34,6 @@
 #include <linux/ip.h>
 #include <linux/cache.h>
 #include <linux/security.h>
-#include <net/sock.h>
 
 #ifndef __KERNEL__
 #warning This file is not supposed to be used outside of kernel.
@@ -161,7 +160,7 @@ static inline int ip_route_connect(struct rtable **rp, __be32 dst,
                                         .dport = dport } } };
 
        int err;
-       struct net *net = sk->sk_net;
+       struct net *net = sock_net(sk);
        if (!dst || !src) {
                err = __ip_route_output_key(net, rp, &fl);
                if (err)
@@ -189,7 +188,7 @@ static inline int ip_route_newports(struct rtable **rp, u8 protocol,
                ip_rt_put(*rp);
                *rp = NULL;
                security_sk_classify_flow(sk, &fl);
-               return ip_route_output_flow(sk->sk_net, rp, &fl, sk, 0);
+               return ip_route_output_flow(sock_net(sk), rp, &fl, sk, 0);
        }
        return 0;
 }