From owner-svn-src-all@freebsd.org Sun Mar 27 22:58:57 2016 Return-Path: Delivered-To: svn-src-all@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 5CA87ADF5B3; Sun, 27 Mar 2016 22:58:57 +0000 (UTC) (envelope-from ian@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 1B83E1F60; Sun, 27 Mar 2016 22:58:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2RMwuPC012284; Sun, 27 Mar 2016 22:58:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2RMwuGk012283; Sun, 27 Mar 2016 22:58:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201603272258.u2RMwuGk012283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 27 Mar 2016 22:58:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297325 - head/sys/nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 22:58:57 -0000 Author: ian Date: Sun Mar 27 22:58:56 2016 New Revision: 297325 URL: https://svnweb.freebsd.org/changeset/base/297325 Log: Stop setting the default route to the IP of the interface itself when the bootp/dhcp server doesn't provide a router option. Doing so prevents setting defaultrouter= in rc.conf (it fails because there's already a bogus default route installed by bootpc_init). When an admin wants to use this style of proxy arp on an interface, the proper mechanism is to set the "use-lease-addr-for-default-route" flag in the dhcp server config. That causes the lease address to be delivered in the routers option, and the normal handling of the routers option will then install the self-ip as the default route. PR: 187094 Modified: head/sys/nfs/bootp_subr.c Modified: head/sys/nfs/bootp_subr.c ============================================================================== --- head/sys/nfs/bootp_subr.c Sun Mar 27 22:36:32 2016 (r297324) +++ head/sys/nfs/bootp_subr.c Sun Mar 27 22:58:56 2016 (r297325) @@ -1072,7 +1072,7 @@ bootpc_adjust_interface(struct bootpc_if /* Add new default route */ - if (ifctx->gotgw != 0 || gctx->gotgw == 0) { + if (ifctx->gw.sin_addr.s_addr != htonl(INADDR_ANY)) clear_sinaddr(&defdst); clear_sinaddr(&defmask); /* XXX MRT just table 0 */ @@ -1552,10 +1552,6 @@ bootpc_decode_reply(struct nfsv3_diskles else ifctx->netmask.sin_addr.s_addr = htonl(IN_CLASSC_NET); } - if (ifctx->gotgw == 0) { - /* Use proxyarp */ - ifctx->gw.sin_addr.s_addr = ifctx->myaddr.sin_addr.s_addr; - } } void