aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/mountd/mountd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/mountd/mountd.c')
-rw-r--r--usr.sbin/mountd/mountd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index 1a10e9dc1c60..03a084dec033 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -1026,8 +1026,13 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *transp)
syslog(LOG_ERR, "request from unknown address family");
return;
}
- lookup_failed = getnameinfo(saddr, saddr->sa_len, host, sizeof host,
- NULL, 0, 0);
+ switch (rqstp->rq_proc) {
+ case MOUNTPROC_MNT:
+ case MOUNTPROC_UMNT:
+ case MOUNTPROC_UMNTALL:
+ lookup_failed = getnameinfo(saddr, saddr->sa_len, host,
+ sizeof host, NULL, 0, 0);
+ }
getnameinfo(saddr, saddr->sa_len, numerichost,
sizeof numerichost, NULL, 0, NI_NUMERICHOST);
switch (rqstp->rq_proc) {