[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>
This commit is contained in:
committed by
David S. Miller
parent
f51d599fbe
commit
e5ba31f11f
@ -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)
|
||||
|
Reference in New Issue
Block a user