diff options
author | Ian Lepore <ian@FreeBSD.org> | 2016-03-27 22:58:56 +0000 |
---|---|---|
committer | Ian Lepore <ian@FreeBSD.org> | 2016-03-27 22:58:56 +0000 |
commit | 25101b0b1c2fc0bc6e41b518813d3958f80b1540 (patch) | |
tree | 2b313f6d64854e96246ef02503f78e7483bb0684 /sys/nfs/bootp_subr.c | |
parent | d32d350eeb3a34e1032d5187bb16bae2fd19f28d (diff) | |
download | src-25101b0b1c2fc0bc6e41b518813d3958f80b1540.tar.gz src-25101b0b1c2fc0bc6e41b518813d3958f80b1540.zip |
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
Notes
Notes:
svn path=/head/; revision=297325
Diffstat (limited to 'sys/nfs/bootp_subr.c')
-rw-r--r-- | sys/nfs/bootp_subr.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/nfs/bootp_subr.c b/sys/nfs/bootp_subr.c index 3a40a59d9c12..044ba0ff0c2d 100644 --- a/sys/nfs/bootp_subr.c +++ b/sys/nfs/bootp_subr.c @@ -1072,7 +1072,7 @@ bootpc_adjust_interface(struct bootpc_ifcontext *ifctx, /* 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_diskless *nd, struct bootpc_ifcontext *ifctx, 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 |