From owner-svn-src-projects@freebsd.org Thu Nov 9 11:47:49 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 213A6E7269B for ; Thu, 9 Nov 2017 11:47:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF0E02F82; Thu, 9 Nov 2017 11:47:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA9Blm8k045599; Thu, 9 Nov 2017 11:47:48 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA9BllQ9045597; Thu, 9 Nov 2017 11:47:47 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201711091147.vA9BllQ9045597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 9 Nov 2017 11:47:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r325575 - projects/pnfs-planb-server-stable11/sys/fs/nfsserver X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server-stable11/sys/fs/nfsserver X-SVN-Commit-Revision: 325575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Nov 2017 11:47:49 -0000 Author: rmacklem Date: Thu Nov 9 11:47:47 2017 New Revision: 325575 URL: https://svnweb.freebsd.org/changeset/base/325575 Log: Add the recent commit to stable/11 (r325341) that fixes dumping of addresses for 64bit and NFSv4.1. Modified: projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdserv.c projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdstate.c Modified: projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdserv.c Thu Nov 9 11:45:59 2017 (r325574) +++ projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdserv.c Thu Nov 9 11:47:47 2017 (r325575) @@ -3927,6 +3927,7 @@ nfsrvd_exchangeid(struct nfsrv_descript *nd, __unused uint32_t sp4type, v41flags; uint64_t owner_minor; struct timespec verstime; + struct sockaddr_in *sad, *rad; if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) { nd->nd_repstat = NFSERR_WRONGSEC; @@ -3950,6 +3951,13 @@ nfsrvd_exchangeid(struct nfsrv_descript *nd, __unused NFSINITSOCKMUTEX(&clp->lc_req.nr_mtx); NFSSOCKADDRALLOC(clp->lc_req.nr_nam); NFSSOCKADDRSIZE(clp->lc_req.nr_nam, sizeof (struct sockaddr_in)); + sad = NFSSOCKADDR(nd->nd_nam, struct sockaddr_in *); + rad = NFSSOCKADDR(clp->lc_req.nr_nam, struct sockaddr_in *); + rad->sin_family = AF_INET; + rad->sin_addr.s_addr = 0; + rad->sin_port = 0; + if (sad->sin_family == AF_INET) + rad->sin_addr.s_addr = sad->sin_addr.s_addr; clp->lc_req.nr_cred = NULL; NFSBCOPY(verf, clp->lc_verf, NFSX_VERF); clp->lc_idlen = idlen; Modified: projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdstate.c Thu Nov 9 11:45:59 2017 (r325574) +++ projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdstate.c Thu Nov 9 11:47:47 2017 (r325575) @@ -3946,11 +3946,11 @@ nfsrv_getclientipaddr(struct nfsrv_descript *nd, struc u_char protocol[5], addr[24]; int error = 0, cantparse = 0; union { - u_long ival; + in_addr_t ival; u_char cval[4]; } ip; union { - u_short sval; + in_port_t sval; u_char cval[2]; } port; @@ -4044,8 +4044,10 @@ nfsrv_getclientipaddr(struct nfsrv_descript *nd, struc } if (cantparse) { sad = NFSSOCKADDR(nd->nd_nam, struct sockaddr_in *); - rad->sin_addr.s_addr = sad->sin_addr.s_addr; - rad->sin_port = 0x0; + if (sad->sin_family == AF_INET) { + rad->sin_addr.s_addr = sad->sin_addr.s_addr; + rad->sin_port = 0x0; + } clp->lc_program = 0; } nfsmout: