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=<ip> 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 _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"