From owner-svn-src-projects@freebsd.org Sat Jun 30 12:17:51 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA65B102D9AB for ; Sat, 30 Jun 2018 12:17:50 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DB467B7F8; Sat, 30 Jun 2018 12:17:50 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7BBC57D70; Sat, 30 Jun 2018 12:17:50 +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 w5UCHo7I003718; Sat, 30 Jun 2018 12:17:50 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UCHonN003717; Sat, 30 Jun 2018 12:17:50 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806301217.w5UCHonN003717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 30 Jun 2018 12:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r335815 - projects/pnfs-planb-server/usr.sbin/nfsd X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/usr.sbin/nfsd X-SVN-Commit-Revision: 335815 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.26 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: Sat, 30 Jun 2018 12:17:51 -0000 Author: rmacklem Date: Sat Jun 30 12:17:50 2018 New Revision: 335815 URL: https://svnweb.freebsd.org/changeset/base/335815 Log: Add a safety belt assignment to the nfsd for when "-p" isn't specified. The kernel code assumes that nfsdargs.addr == NULL and nfsdargs.addrlen == 0 when there is no "-p" argument used for starting the nfsd. This small patch ensures this is the case. In practice, I believe this always happened, since "nfsdargs" was the last element on the stack for "main()", but this little patch ensures it will be the case. Spotted by inspection while adding a new optional field for "-p". 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 Sat Jun 30 12:14:20 2018 (r335814) +++ projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c Sat Jun 30 12:17:50 2018 (r335815) @@ -180,6 +180,8 @@ main(int argc, char **argv) struct nfsd_nfsd_args nfsdargs; nfsdargs.mirrorcnt = 1; + nfsdargs.addr = NULL; + nfsdargs.addrlen = 0; nfsdcnt = DEFNFSDCNT; unregister = reregister = tcpflag = maxsock = 0; bindanyflag = udpflag = connect_type_cnt = bindhostc = 0;