]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
SUNRPC: Handle EINVAL error returns from the TCP connect operation
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 2 Mar 2010 18:06:21 +0000 (13:06 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 16:07:03 +0000 (09:07 -0700)
commit 9fcfe0c83c3b04a759cde6b8c5f961237f17808b upstream.

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

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/sunrpc/xprtsock.c

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