Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2018 23:48:49 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r335095 - projects/pnfs-planb-server/usr.sbin/nfsd
Message-ID:  <201806132348.w5DNmnq4053310@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Wed Jun 13 23:48:49 2018
New Revision: 335095
URL: https://svnweb.freebsd.org/changeset/base/335095

Log:
  Although they both seem to work, ai_addrlen seems like the better length
  to check than ai_addr->sa_len.

Modified:
  projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c

Modified: projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c
==============================================================================
--- projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c	Wed Jun 13 23:30:54 2018	(r335094)
+++ projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c	Wed Jun 13 23:48:49 2018	(r335095)
@@ -1250,7 +1250,7 @@ parse_dsserver(const char *optionarg, struct nfsd_nfsd
 			err(1, "getaddrinfo pnfs: %s %s", cp,
 			    gai_strerror(ecode));
 		if (ai_tcp->ai_addr->sa_family != AF_INET ||
-		    ai_tcp->ai_addr->sa_len < sizeof(sin))
+		    ai_tcp->ai_addrlen < sizeof(sin))
 			err(1, "getaddrinfo() returned non-INET address");
 		/* Mips cares about sockaddr_in alignment, so copy the addr. */
 		memcpy(&sin, ai_tcp->ai_addr, sizeof(sin));



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