--- client.c.orig Mon Feb 12 17:05:43 2001 +++ client.c Fri Feb 16 15:58:35 2001 @@ -87,8 +87,16 @@ nfs_client * client_dup(nfs_client *clp, struct hostent *hp) { - nfs_client *new; + nfs_client *new, *eclp; + /* + * If a FQDN client for this host already exists, + * use it to make sure kernel gets 1 name only. + */ + for (eclp = clientlist[MCL_FQDN]; eclp; eclp = eclp->m_next) { + if (client_check(eclp, hp)) + return eclp; + } new = (nfs_client *) xmalloc(sizeof(*new)); memcpy(new, clp, sizeof(*new)); new->m_type = MCL_FQDN; --- xtab.c.orig Thu Nov 30 16:30:57 2000 +++ xtab.c Fri Feb 16 15:33:27 2001 @@ -28,6 +28,7 @@ */ struct exportent *xp; nfs_export *exp; + nfs_client *clp; int lockid; if ((lockid = xflock(xtab, "r")) < 0) @@ -41,6 +42,17 @@ switch (is_export) { case 0: exp->m_exported = 1; + /* + * This export is in the kernel already. Make sure client + * name matches so that kernel is kept consistent. + */ + clp = exp->m_client; + if (clp->m_type == MCL_FQDN && + strcmp(xp->e_hostname, clp->m_hostname)) { + strncpy(clp->m_hostname, xp->e_hostname, + sizeof(clp->m_hostname) - 1); + clp->m_hostname[sizeof(clp->m_hostname) - 1] = '\0'; + } break; case 1: exp->m_xtabent = 1;