diff options
Diffstat (limited to 'include/net/route.h')
| -rw-r--r-- | include/net/route.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/net/route.h b/include/net/route.h index eadad5901429..c6338802e8f1 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
| @@ -34,7 +34,6 @@ | |||
| 34 | #include <linux/ip.h> | 34 | #include <linux/ip.h> |
| 35 | #include <linux/cache.h> | 35 | #include <linux/cache.h> |
| 36 | #include <linux/security.h> | 36 | #include <linux/security.h> |
| 37 | #include <net/sock.h> | ||
| 38 | 37 | ||
| 39 | #ifndef __KERNEL__ | 38 | #ifndef __KERNEL__ |
| 40 | #warning This file is not supposed to be used outside of kernel. | 39 | #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, | |||
| 161 | .dport = dport } } }; | 160 | .dport = dport } } }; |
| 162 | 161 | ||
| 163 | int err; | 162 | int err; |
| 164 | struct net *net = sk->sk_net; | 163 | struct net *net = sock_net(sk); |
| 165 | if (!dst || !src) { | 164 | if (!dst || !src) { |
| 166 | err = __ip_route_output_key(net, rp, &fl); | 165 | err = __ip_route_output_key(net, rp, &fl); |
| 167 | if (err) | 166 | if (err) |
| @@ -189,7 +188,7 @@ static inline int ip_route_newports(struct rtable **rp, u8 protocol, | |||
| 189 | ip_rt_put(*rp); | 188 | ip_rt_put(*rp); |
| 190 | *rp = NULL; | 189 | *rp = NULL; |
| 191 | security_sk_classify_flow(sk, &fl); | 190 | security_sk_classify_flow(sk, &fl); |
| 192 | return ip_route_output_flow(sk->sk_net, rp, &fl, sk, 0); | 191 | return ip_route_output_flow(sock_net(sk), rp, &fl, sk, 0); |
| 193 | } | 192 | } |
| 194 | return 0; | 193 | return 0; |
| 195 | } | 194 | } |
