RDS-TCP: Make RDS-TCP work correctly when it is set up in a netns other than init_net
Open the sockets calling sock_create_kern() with the correct struct net pointer, and use that struct net pointer when verifying the address passed to rds_bind(). Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
1ebd08a7e5
commit
d5a8ac28a7
@@ -185,7 +185,8 @@ int rds_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
trans = rds_trans_get_preferred(sin->sin_addr.s_addr);
|
||||
trans = rds_trans_get_preferred(sock_net(sock->sk),
|
||||
sin->sin_addr.s_addr);
|
||||
if (!trans) {
|
||||
ret = -EADDRNOTAVAIL;
|
||||
rds_remove_bound(rs);
|
||||
|
Reference in New Issue
Block a user