svn commit: r342841 - stable/12/usr.sbin/mountd
Sean Eric Fagan
sef at FreeBSD.org
Mon Jan 7 05:58:56 UTC 2019
Author: sef
Date: Mon Jan 7 05:58:55 2019
New Revision: 342841
URL: https://svnweb.freebsd.org/changeset/base/342841
Log:
MFC r341641: Reduce number of DNS queries in mountd.
Approved by: mav
Sponsored by: iXsystems Inc.
Modified:
stable/12/usr.sbin/mountd/mountd.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/usr.sbin/mountd/mountd.c
==============================================================================
--- stable/12/usr.sbin/mountd/mountd.c Mon Jan 7 05:49:27 2019 (r342840)
+++ stable/12/usr.sbin/mountd/mountd.c Mon Jan 7 05:58:55 2019 (r342841)
@@ -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) {
More information about the svn-src-stable
mailing list