svn commit: r346769 - stable/11/usr.sbin/mountd

Alexander Motin mav at FreeBSD.org
Fri Apr 26 21:44:52 UTC 2019


Author: mav
Date: Fri Apr 26 21:44:51 2019
New Revision: 346769
URL: https://svnweb.freebsd.org/changeset/base/346769

Log:
  MFC r341641 (by sef): Reduce number of DNS queries in mountd.

Modified:
  stable/11/usr.sbin/mountd/mountd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/mountd/mountd.c
==============================================================================
--- stable/11/usr.sbin/mountd/mountd.c	Fri Apr 26 21:34:08 2019	(r346768)
+++ stable/11/usr.sbin/mountd/mountd.c	Fri Apr 26 21:44:51 2019	(r346769)
@@ -1024,8 +1024,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