static exports get_exportlist(void);
static struct nfs_fh_len *get_rootfh(struct svc_req *, dirpath *, mountstat3 *, int v3);
+int reverse_resolve = 0;
int new_cache = 0;
/* PRC: a high-availability callout program can be specified with -H
if (!(exp = auth_authenticate("unmount", sin, p))) {
return 1;
}
- if (new_cache) {
- if (strcmp(inet_ntoa(exp->m_client->m_addrlist[0]), exp->m_client->m_hostname))
- mountlist_del(inet_ntoa(exp->m_client->m_addrlist[0]), exp->m_client->m_hostname);
- mountlist_del(exp->m_client->m_hostname, p);
- } else {
- mountlist_del(exp->m_client->m_hostname, p);
+
+ if (!new_cache)
export_reset (exp);
- }
+
+ mountlist_del(inet_ntoa(sin->sin_addr), p);
return 1;
}
fh = cache_get_filehandle(exp, v3?64:32, p);
if (fh == NULL)
*error = NFSERR_ACCES;
- else
+ else {
*error = NFS_OK;
+ mountlist_add(inet_ntoa(sin->sin_addr), p);
+ }
return fh;
} else {
struct nfs_fh_len *fh;
stb.st_dev, stb.st_ino);
}
if (fh != NULL) {
- mountlist_add(exp->m_client->m_hostname, p);
+ mountlist_add(inet_ntoa(sin->sin_addr), p);
*error = NFS_OK;
export_reset (exp);
return fh;
/* Parse the command line options and arguments. */
opterr = 0;
- while ((c = getopt_long(argc, argv, "o:n:Fd:f:p:P:hH:N:V:vs:t:", longopts, NULL)) != EOF)
+ while ((c = getopt_long(argc, argv, "o:nFd:f:p:P:hH:N:V:vrs:t:", longopts, NULL)) != EOF)
switch (c) {
case 'o':
descriptors = atoi(optarg);
case 'n':
_rpcfdtype = SOCK_DGRAM;
break;
+ case 'r':
+ reverse_resolve = 1;
+ break;
case 's':
if ((state_dir = xstrdup(optarg)) == NULL) {
fprintf(stderr, "%s: xstrdup(%s) failed!\n",