svn commit: r335095 - projects/pnfs-planb-server/usr.sbin/nfsd
Rick Macklem
rmacklem at FreeBSD.org
Wed Jun 13 23:48:50 UTC 2018
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));
More information about the svn-src-projects
mailing list