Browse Source

SUNRPC: Handle EINVAL error returns from the TCP connect operation

This can, for instance, happen if the user specifies a link local IPv6
address.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
Trond Myklebust 15 years ago
parent
commit
9fcfe0c83c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      net/sunrpc/xprtsock.c

+ 5 - 0
net/sunrpc/xprtsock.c

@@ -1912,6 +1912,11 @@ static void xs_tcp_setup_socket(struct rpc_xprt *xprt,
 	case -EALREADY:
 	case -EALREADY:
 		xprt_clear_connecting(xprt);
 		xprt_clear_connecting(xprt);
 		return;
 		return;
+	case -EINVAL:
+		/* Happens, for instance, if the user specified a link
+		 * local IPv6 address without a scope-id.
+		 */
+		goto out;
 	}
 	}
 out_eagain:
 out_eagain:
 	status = -EAGAIN;
 	status = -EAGAIN;