X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=utils%2Fmountd%2Fcache.c;h=b01c0bdb4e944286a03664c33c53bb922999e04a;hb=3d7faa0249332e23a2dc2e3e78020ed6bc66036a;hp=ac9cdbd2e0ed30fedcd03a368e1f79797cda3f35;hpb=ab74900ff59ef54e2ef7e2523b2f6f1ea8e695c8;p=nfs-utils.git 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) ||