Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 1999 09:36:44 -0700 (PDT)
From:      m.seaman@inpharmatica.co.uk
To:        freebsd-gnats-submit@freebsd.org
Subject:   bin/12136: /sbin/dhclient-script: weird route commands
Message-ID:  <19990611163644.A401E154F7@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         12136
>Category:       bin
>Synopsis:       /sbin/dhclient-script: weird route commands
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 11 09:40:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Matthew Seaman
>Release:        3.2-STABLE of  Fri Jun 11 09:31:00 BST 1999
>Organization:
Inpharmatica Ltd
>Environment:
FreeBSD b0.farm.inpharmatica.co.uk 3.2-STABLE FreeBSD 3.2-STABLE #0: Fri Jun 11 09:31:00 BST 1999     matthew@b9.farm.inpharmatica.co.uk:/usr/src/sys/compile/FARM  alpha

>Description:
/sbin/dhclient-script will attempt to add a route from any new interface
IP address via 127.1 (or via 127.0.0.1 for aliases):

    route add $new_ip_address 127.1 >/dev/null 2>&1

which doesn't seem to achieve anything except causing the system log to
fill up with lines like:

Jun 11 02:23:43 b0 /kernel: arplookup 127.0.0.1 failed: could not allocate llinfo
Jun 11 02:23:43 b0 /kernel: arpresolve: can't allocate llinfo for 127.0.0.1rt

These repeat every 16 or so seconds ad-infinitum.  Since there are two
lines, syslogd's usual "last message repeated N times" mechanism
doesn't happen either.
>How-To-Repeat:
Install DHCP server on network
configure kernel on test machine with bpfilter
touch /etc/dhclient.conf

Assuming interface to be managed by dhcp is de0:

cat <<FOO > /etc/start_if.de0
#!/bin/sh

/sbin/dhclient de0
FOO
Comment out defaultrouter and ifconfig_de0 lines in /etc/rc.conf
Reboot

>Fix:
Apply this patch.  

--- /sbin/dhclient-script.orig  Fri Jun 11 16:37:20 1999
+++ /sbin/dhclient-script       Fri Jun 11 16:51:41 1999
@@ -62,7 +62,7 @@
 if [ x$reason = xPREINIT ]; then
   if [ x$alias_ip_address != x ]; then
     ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
-    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
+    #route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
   fi
   ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
                broadcast 255.255.255.255 up
@@ -82,7 +82,6 @@
   fi
   if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
     ifconfig $interface inet -alias $old_ip_address $medium
-    route delete $old_ip_address 127.1 >/dev/null 2>&1
     for router in $old_routers; do
       route delete default $router >/dev/null 2>&1
     done
@@ -99,7 +98,6 @@
      [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
     ifconfig $interface inet $new_ip_address $new_netmask_arg \
                                        $new_broadcast_arg $medium
-    route add $new_ip_address 127.1 >/dev/null 2>&1
     for router in $new_routers; do
       route add default $router >/dev/null 2>&1
     done
@@ -115,7 +113,6 @@
   if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
    then
     ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
-    route add $alias_ip_address 127.0.0.1
   fi
   echo search $new_domain_name >/etc/resolv.conf
   for nameserver in $new_domain_name_servers; do
@@ -127,11 +124,9 @@
 if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
   if [ x$alias_ip_address != x ]; then
     ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
-    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
   fi
   if [ x$old_ip_address != x ]; then
     ifconfig $interface inet -alias $old_ip_address $medium
-    route delete $old_ip_address 127.1 >/dev/null 2>&1
     for router in $old_routers; do
       route delete default $router >/dev/null 2>&1
     done
@@ -147,7 +142,6 @@
   fi
   if [ x$alias_ip_address != x ]; then
     ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
-    route add $alias_ip_address 127.0.0.1
   fi
   exit_with_hooks 0
 fi
@@ -155,7 +149,6 @@
 if [ x$reason = xTIMEOUT ]; then
   if [ x$alias_ip_address != x ]; then
     ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
-    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
   fi
   ifconfig $interface inet $new_ip_address $new_netmask_arg \
                                        $new_broadcast_arg $medium
@@ -167,9 +160,7 @@
       if [ x$new_ip_address != x$alias_ip_address ] && \
                        [ x$alias_ip_address != x ]; then
        ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
-       route add $alias_ip_address 127.0.0.1
       fi
-      route add $new_ip_address 127.1 >/dev/null 2>&1
       for router in $new_routers; do
        route add default $router >/dev/null 2>&1
       done


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990611163644.A401E154F7>