Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2019 05:58:55 +0000 (UTC)
From:      Sean Eric Fagan <sef@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r342841 - stable/12/usr.sbin/mountd
Message-ID:  <201901070558.x075wtnQ085112@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901070558.x075wtnQ085112>