summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-03-16 11:58:39 +1100
committerNeil Brown <neilb@suse.de>2007-03-16 11:58:39 +1100
commit116748fccf43b246f200ec1ece0a300e43042f31 (patch)
tree4446a3bbcee1f581f5baa073258862708c5eb03e
parent8ab0b89f09dff407101a6f22265873a283e73901 (diff)
downloadnfs-utils-116748fccf43b246f200ec1ece0a300e43042f31.tar.gz
nfs-utils-116748fccf43b246f200ec1ece0a300e43042f31.tar.xz
nfs-utils-116748fccf43b246f200ec1ece0a300e43042f31.zip
Don't complain if two exports of different types match the same IP address.
As nfs-utils as an ordering of client types (hostname, netmask, wildcard, netgroup), it is expected that sometimes the one IP will match two or more of these and the first will over-ride. So don't both complaining when that happens.
-rw-r--r--utils/mountd/cache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
index 6cf24ce..ed7fe35 100644
--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -490,6 +490,7 @@ void nfsd_export(FILE *f)
int i;
char *dom, *path;
nfs_export *exp, *found = NULL;
+ int found_type = 0;
if (readline(fileno(f), &lbuf, &lbuflen) != 1)
@@ -516,9 +517,10 @@ void nfsd_export(FILE *f)
continue;
if (strcmp(path, exp->m_export.e_path))
continue;
- if (!found)
+ if (!found) {
found = exp;
- else {
+ found_type = i;
+ } else if (found_type == i) {
xlog(L_WARNING, "%s exported to both %s and %s in %s",
path, exp->m_client->m_hostname, found->m_client->m_hostname,
dom);