diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-05-03 14:56:19 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2012-05-03 15:12:09 -0400 |
commit | b46c04422f2a4ae76b89bf43a21839b1c5a1fc79 (patch) | |
tree | 996b48a2177d870f5ba18900cc45d7cd597ea72d | |
parent | bf66c9facb8e4798c79e1286e3da2dcafeed83fb (diff) | |
download | nfs-utils-b46c04422f2a4ae76b89bf43a21839b1c5a1fc79.tar.gz nfs-utils-b46c04422f2a4ae76b89bf43a21839b1c5a1fc79.tar.xz nfs-utils-b46c04422f2a4ae76b89bf43a21839b1c5a1fc79.zip |
mountd: fix export upcall failure in use_ipaddr case
After 0509d3428f523 "mountd: Replace "struct hostent" with "struct
addinfo"", the export upcall fails in the use_ipaddr case.
I think we never noticed because a) the use_ipaddr case is rarer than
the !use_ipaddr case, and b) the nfsd_fh upcall does a preemptive export
downcall that renders the nfsd export call unnecessary in some cases.
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | utils/mountd/cache.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index 0af6404..47c8691 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -1077,6 +1077,7 @@ static void nfsd_export(FILE *f) goto out; ai = client_resolve(tmp->ai_addr); freeaddrinfo(tmp); + if (!ai) goto out; } |