]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- The dhclient-script was updated to create a host route for the default
authorDavid Hankins <dhankins@isc.org>
Wed, 16 Jan 2008 23:02:10 +0000 (23:02 +0000)
committerDavid Hankins <dhankins@isc.org>
Wed, 16 Jan 2008 23:02:10 +0000 (23:02 +0000)
  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
client/scripts/freebsd
client/scripts/linux

index ec681ac8d141a8039d76ed88d4776de9d26c3b28..99d56e40d3b02c4c4b8b7e3f9b62f2fdeb836cea 100644 (file)
--- 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
index 988c9ef056a1513fc3f5601c9702cb9f8f526016..67ff002e02335783adc3212d81bc3f2b78629641 100755 (executable)
@@ -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
index 6ac25dd4958527933e9467b757e573763d981d05..a0fcab55d274de51595adb65c1a3a7401a2b1cd4 100755 (executable)
@@ -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