From 30922d9c3cdaa7bf8c28595e5286731fcfac50ef Mon Sep 17 00:00:00 2001 From: David Hankins Date: Wed, 16 Jan 2008 23:02:10 +0000 Subject: - 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] --- RELNOTES | 5 +++++ client/scripts/freebsd | 11 ++++++++++- client/scripts/linux | 6 ++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index ec681ac8..99d56e40 100644 --- a/RELNOTES +++ b/RELNOTES @@ -121,6 +121,11 @@ suggested fixes to . - 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 -- cgit v1.2.1