Blame SOURCES/nfs-utils-1.3.0-mount-addressfailed.patch
|
|
ac70f0 |
diff -up nfs-utils-1.3.0/utils/nfsd/nfssvc.c.orig nfs-utils-1.3.0/utils/nfsd/nfssvc.c
|
|
|
ac70f0 |
--- nfs-utils-1.3.0/utils/nfsd/nfssvc.c.orig 2017-10-05 11:34:15.701116069 -0400
|
|
|
ac70f0 |
+++ nfs-utils-1.3.0/utils/nfsd/nfssvc.c 2017-10-05 11:35:36.493684800 -0400
|
|
|
ac70f0 |
@@ -112,7 +112,7 @@ static int
|
|
|
ac70f0 |
nfssvc_setfds(const struct addrinfo *hints, const char *node, const char *port)
|
|
|
ac70f0 |
{
|
|
|
ac70f0 |
int fd, on = 1, fac = L_ERROR;
|
|
|
ac70f0 |
- int sockfd = -1, rc = 0;
|
|
|
ac70f0 |
+ int sockfd = -1, rc = 0, bounded = 0;
|
|
|
ac70f0 |
struct addrinfo *addrhead = NULL, *addr;
|
|
|
ac70f0 |
char *proto, *family;
|
|
|
ac70f0 |
|
|
|
ac70f0 |
@@ -234,6 +234,8 @@ nfssvc_setfds(const struct addrinfo *hin
|
|
|
ac70f0 |
rc = errno;
|
|
|
ac70f0 |
goto error;
|
|
|
ac70f0 |
}
|
|
|
ac70f0 |
+ bounded++;
|
|
|
ac70f0 |
+
|
|
|
ac70f0 |
close(fd);
|
|
|
ac70f0 |
close(sockfd);
|
|
|
ac70f0 |
sockfd = fd = -1;
|
|
|
ac70f0 |
@@ -246,7 +248,7 @@ error:
|
|
|
ac70f0 |
close(sockfd);
|
|
|
ac70f0 |
if (addrhead)
|
|
|
ac70f0 |
freeaddrinfo(addrhead);
|
|
|
ac70f0 |
- return rc;
|
|
|
ac70f0 |
+ return (bounded ? 0 : rc);
|
|
|
ac70f0 |
}
|
|
|
ac70f0 |
|
|
|
ac70f0 |
int
|