Package: dhcp3-client
Version: 3.1.1-6
Severity: normal
Tags: patch

I use dnsmasq (2.45) as DHCP server on a OpenBSD system.
The DHCP server send classless static routes (through option 121) to all the 
client but
my Debian system does not update the routing table; this is my dhclient.conf:

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        netbios-name-servers, netbios-scope, interface-mtu,
        rfc3442-classless-static-routes;

It seems that the script
/etc/dhcp3/dhclient-exit-hooks.d/rfc3442-classless-routes
does not use the environment variable $reason correctly.

I have replace the line 7 of the script
if [ x"$reason" == x"BOUND" ]; then
with
if [ x"$reason" == x"BOUND" -o x"$reason" == x"REBOOT" ]; then

Now it works and the routing table is updated.

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (900, 'stable'), (800, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages dhcp3-client depends on:
ii  debconf [debconf-2.0]         1.5.24     Debian configuration management sy
ii  debianutils                   2.30       Miscellaneous utilities specific t
ii  dhcp3-common                  3.1.1-6    common files used by all the dhcp3
ii  libc6                         2.7-18     GNU C Library: Shared libraries

dhcp3-client recommends no packages.

Versions of packages dhcp3-client suggests:
pn  avahi-autoipd                 <none>     (no description available)
pn  resolvconf                    <none>     (no description available)

-- debconf information:
  dhcp3-client/dhclient-needs-restarting:
  dhcp3-client/dhclient-script_moved:
--- rfc3442-classless-routes.original   2009-05-02 12:24:58.000000000 +0200
+++ rfc3442-classless-routes    2009-05-02 12:25:12.000000000 +0200
@@ -2,11 +2,11 @@
 
 if [ "$RUN" = "yes" ]; then
 
         if [ x"$new_rfc3442_classless_static_routes" != x"" ]; then
 
-                if [ x"$reason" == x"BOUND" ]; then
+                if [ x"$reason" == x"BOUND" -o x"$reason" == x"REBOOT" ]; then
 
                         rfc_routes=($new_rfc3442_classless_static_routes)
 
                         for(( i=0; i < ${#rfc_rout...@]}; )); do
                                 net_length=${rfc_routes[$i]}

Reply via email to