X-Git-Url: https://git.whamcloud.com/gitweb?a=blobdiff_plain;f=lnet%2Flnet%2Facceptor.c;h=e1a18a4b1232763ca4aed82d2133da16cb5860dd;hb=97084f70a6c2956d49d8dc289aeb8ede84e5f7b4;hp=75e9f2799fe7183d3efbd585495ab9541b7bf660;hpb=b2ede01d1ed77ddc512c013220f6ea8b509e9541;p=fs%2Flustre-release.git diff --git a/lnet/lnet/acceptor.c b/lnet/lnet/acceptor.c index 75e9f27..e1a18a4 100644 --- a/lnet/lnet/acceptor.c +++ b/lnet/lnet/acceptor.c @@ -152,7 +152,6 @@ lnet_connect(struct socket **sockp, lnet_nid_t peer_nid, struct socket *sock; int rc; int port; - int fatal; BUILD_BUG_ON(sizeof(cr) > 16); /* not too big to be on the stack */ @@ -161,13 +160,13 @@ lnet_connect(struct socket **sockp, lnet_nid_t peer_nid, --port) { /* Iterate through reserved ports. */ - rc = lnet_sock_connect(&sock, &fatal, - local_ip, port, - peer_ip, peer_port, ns); - if (rc != 0) { - if (fatal) - goto failed; - continue; + rc = lnet_sock_connect(&sock, + local_ip, port, + peer_ip, peer_port, ns); + if (rc) { + if (rc == -EADDRINUSE || rc == -EADDRNOTAVAIL) + continue; + goto failed; } BUILD_BUG_ON(LNET_PROTO_ACCEPTOR_VERSION != 1);