aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/raw.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-01-14 05:36:27 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:02:06 -0800
commite5ba31f11f6cae785e893d5d10abd612fef0b6bc (patch)
tree9c4f4782fc52569218e6e9b1c8ab5c5820cd53eb /net/ipv4/raw.c
parent[NETNS][RAW]: Make /proc/net/raw(6) show per-namespace socket list. (diff)
downloadlinux-dev-e5ba31f11f6cae785e893d5d10abd612fef0b6bc.tar.xz
linux-dev-e5ba31f11f6cae785e893d5d10abd612fef0b6bc.zip
[NETNS][RAW]: Eliminate explicit init_net references.
Happily, in all the rest places (->bind callbacks only), that require the struct net, we have a socket, so get the net from it. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r--net/ipv4/raw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 4e95372a78e7..206c869db921 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -625,7 +625,7 @@ static int raw_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
if (sk->sk_state != TCP_CLOSE || addr_len < sizeof(struct sockaddr_in))
goto out;
- chk_addr_ret = inet_addr_type(&init_net, addr->sin_addr.s_addr);
+ chk_addr_ret = inet_addr_type(sk->sk_net, addr->sin_addr.s_addr);
ret = -EADDRNOTAVAIL;
if (addr->sin_addr.s_addr && chk_addr_ret != RTN_LOCAL &&
chk_addr_ret != RTN_MULTICAST && chk_addr_ret != RTN_BROADCAST)