X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmountd%2Fcache.c;h=d63e10ae1faf431d190e1c1ba5ca2c742eb038a2;hp=2468bc5916084e06323341ed6aeab006378beef9;hb=948cd2fb7983a4970132a97463b7928399bc51de;hpb=0fe42a6e2cd7252c5c12a5f4edb4c27789b0c043 diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index 2468bc5..d63e10a 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -657,6 +657,11 @@ static nfs_export *lookup_export(char *dom, char *path, struct hostent *he) found_type = i; continue; } + + /* Always prefer non-V4ROOT mounts */ + if (found->m_export.e_flags & NFSEXP_V4ROOT) + continue; + /* If one is a CROSSMOUNT, then prefer the longest path */ if (((found->m_export.e_flags & NFSEXP_CROSSMOUNT) || (exp->m_export.e_flags & NFSEXP_CROSSMOUNT)) &&