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