X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmountd%2Fcache.c;h=b01c0bdb4e944286a03664c33c53bb922999e04a;hp=ac9cdbd2e0ed30fedcd03a368e1f79797cda3f35;hb=8ed7383f1b1766f12a3ad3d6259e5e9e37b64727;hpb=ef6462bd655e5ad9bca537e5f4ecff8df41ff1f2 diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index ac9cdbd..b01c0bd 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -772,10 +772,14 @@ lookup_export(char *dom, char *path, struct addrinfo *ai) found_type = i; continue; } - - /* Always prefer non-V4ROOT mounts */ - if (found->m_export.e_flags & NFSEXP_V4ROOT) + /* Always prefer non-V4ROOT exports */ + if (exp->m_export.e_flags & NFSEXP_V4ROOT) continue; + if (found->m_export.e_flags & NFSEXP_V4ROOT) { + found = exp; + found_type = i; + continue; + } /* If one is a CROSSMOUNT, then prefer the longest path */ if (((found->m_export.e_flags & NFSEXP_CROSSMOUNT) ||