diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-05-06 18:22:42 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-05-06 18:22:42 +0000 |
commit | 17a9a04c8081c79435d0ccaf72cd6ab7960da999 (patch) | |
tree | 715435944af0e72432251a0125cb906d02c4ba70 | |
parent | 710d3b1a5af1484944221ff6259ee05fcfa9089d (diff) |
Support ADSL routers running in half-bridge mode or acctually
almost-broken mode. It seems these devices do proxyarp for the whole
internet and do not provide a real default gateway.
Fix for and from PR3747 by Andrew Basterfield.
OK deraadt@ makes sense krw@
-rw-r--r-- | sbin/dhclient/dhclient-script | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient-script b/sbin/dhclient/dhclient-script index 7133d841e15..3a6ac1877f0 100644 --- a/sbin/dhclient/dhclient-script +++ b/sbin/dhclient/dhclient-script @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: dhclient-script,v 1.5 2004/05/05 23:08:54 deraadt Exp $ +# $OpenBSD: dhclient-script,v 1.6 2004/05/06 18:22:41 claudio Exp $ # # Copyright (c) 2003 Kenneth R Westerback <krw@openbsd.org> # @@ -74,7 +74,11 @@ delete_old_routes() { add_new_routes() { route delete default >/dev/null 2>&1 for router in $new_routers; do - route add default $router >/dev/null 2>&1 + if [ "$new_ip_address" = "$router" ]; then + route add default -iface $router >/dev/null 2>&1 + else + route add default $router >/dev/null 2>&1 + fi # 2nd and subsequent default routers error out, so explicitly # stop processing the list after the first one. break |