]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
mountd: fix export upcall failure in use_ipaddr case
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 3 May 2012 18:56:19 +0000 (14:56 -0400)
committerSteve Dickson <steved@redhat.com>
Thu, 3 May 2012 19:12:09 +0000 (15:12 -0400)
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>
utils/mountd/cache.c

index 0af640441b9b86eab0f0dd023f8ed985b4b4d410..47c8691585332ba5132a43cae211eca571fd501b 100644 (file)
@@ -1077,6 +1077,7 @@ static void nfsd_export(FILE *f)
                        goto out;
                ai = client_resolve(tmp->ai_addr);
                freeaddrinfo(tmp);
+               if (!ai)
                        goto out;
        }