summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hankins <dhankins@isc.org>2008-01-16 23:02:10 +0000
committerDavid Hankins <dhankins@isc.org>2008-01-16 23:02:10 +0000
commit30922d9c3cdaa7bf8c28595e5286731fcfac50ef (patch)
tree8ae6ee803fe59f9b475dffe1271aed9feaf4e48c
parent219a65eb6e4eee3809cfde2151e863665579a44c (diff)
downloadisc-dhcp-30922d9c3cdaa7bf8c28595e5286731fcfac50ef.tar.gz
- The dhclient-script was updated to create a host route for the default
gateway if the supplied subnet mask for an IPv4 address was a /32. This allows the client to work in 'captive' network environments, where the operator does not want clients to crosstalk directly. [ISC-Bugs #17200]
-rw-r--r--RELNOTES5
-rwxr-xr-xclient/scripts/freebsd11
-rwxr-xr-xclient/scripts/linux6
3 files changed, 21 insertions, 1 deletions
diff --git a/RELNOTES b/RELNOTES
index ec681ac8..99d56e40 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -121,6 +121,11 @@ suggested fixes to <dhcp-users@isc.org>.
- Fixed a compilation problems on platforms that define a value for FDDI,
which conflicts with a dhcp configuration syntax token by the same name.
+- The dhclient-script was updated to create a host route for the default
+ gateway if the supplied subnet mask for an IPv4 address was a /32. This
+ allows the client to work in 'captive' network environments, where the
+ operator does not want clients to crosstalk directly.
+
Changes since 4.0.0b3
- The reverse dns name for PTR updates on IPv6 addresses has been fixed to
diff --git a/client/scripts/freebsd b/client/scripts/freebsd
index 988c9ef0..67ff002e 100755
--- a/client/scripts/freebsd
+++ b/client/scripts/freebsd
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: freebsd,v 1.20 2007/11/30 21:28:29 fdupont Exp $
+# $Id: freebsd,v 1.21 2008/01/16 23:02:10 dhankins Exp $
#
# $FreeBSD$
@@ -186,6 +186,12 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
+ # If the subnet is captive, eg the netmask is /32 but the default
+ # gateway is (obviously) outside of this, then we need to produce a
+ # host route to reach the gateway.
+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+ route add -host $router -interface $interface
+ fi
route add default $router >/dev/null 2>&1
done
if [ -n "$new_static_routes" ]; then
@@ -257,6 +263,9 @@ if [ x$reason = xTIMEOUT ]; then
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+ route add -host $router -interface $interface
+ fi
route add default $router >/dev/null 2>&1
done
set -- $new_static_routes
diff --git a/client/scripts/linux b/client/scripts/linux
index 6ac25dd4..a0fcab55 100755
--- a/client/scripts/linux
+++ b/client/scripts/linux
@@ -166,6 +166,9 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
route add -net $new_network_number $new_subnet_arg dev $interface
fi
for router in $new_routers; do
+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+ route add -host $router dev $interface
+ fi
route add default gw $router
done
fi
@@ -214,6 +217,9 @@ if [ x$reason = xTIMEOUT ]; then
route add -net $new_network_number
fi
for router in $new_routers; do
+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+ route add -host $router dev $interface
+ fi
route add default gw $router
done
make_resolv_conf