summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2009-03-18 20:46:44 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-03-28 15:55:18 -0400
commit7d21c0f9845f0ce4e81baac3519fbb2c6c2cc908 (patch)
tree8e4eefa86dfc05bfc0f36452863f55c570c82456 /net
parent26298caacac3e4754194b13aef377706d5de6cf6 (diff)
downloadtalos-op-linux-7d21c0f9845f0ce4e81baac3519fbb2c6c2cc908.tar.gz
talos-op-linux-7d21c0f9845f0ce4e81baac3519fbb2c6c2cc908.zip
SUNRPC: Set IPV6ONLY flag on PF_INET6 RPC listener sockets
We are about to convert to using separate RPC listener sockets for PF_INET and PF_INET6. This echoes the way IPv6 is handled in user space by TI-RPC, and eliminates the need for ULPs to worry about mapped IPv4 AF_INET6 addresses when doing address comparisons. Start by setting the IPV6ONLY flag on PF_INET6 RPC listener sockets. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/svcsock.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index d00bc3307745..ac6cd65220c7 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1144,13 +1144,11 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv,
svc_tcp_init(svsk, serv);
/*
- * We start one listener per sv_serv. We want AF_INET
- * requests to be automatically shunted to our PF_INET6
- * listener using a mapped IPv4 address. Make sure
- * no-one starts an equivalent IPv4 listener, which
- * would steal our incoming connections.
+ * If this is a PF_INET6 listener, we want to avoid
+ * getting requests from IPv4 remotes. Those should
+ * be shunted to a PF_INET listener via rpcbind.
*/
- val = 0;
+ val = 1;
if (inet->sk_family == PF_INET6)
kernel_setsockopt(sock, SOL_IPV6, IPV6_V6ONLY,
(char *)&val, sizeof(val));
OpenPOWER on IntegriCloud