patch for dhclient-script

Pete Zaitcev zaitcev at redhat.com
Wed Jun 16 15:21:02 UTC 2004


On Sun, 13 Jun 2004 12:36:27 -0500 (CDT)
"Brian Millett" <bpm at ec-group.com> wrote:

> For what its worth, I noticed that with the rawhide update on Sat, June
> 12, the dchp client no longer routed.  I determined that before
> dhclient-script finished, there were two entries for default:
> 
> default         *               0.0.0.0         U         0 0          0 eth1
> default         192.168.0.1     0.0.0.0         UG        0 0          0 eth1

I'm wondering where does the first entry originate?

> But then when dhclient-script would finish, the default gw for 192.168.0.1
> world be deleted leaving only the * default gateway.  The following patch
> resolves this, but I do not know it it messes other things.

> diff -wruN /tmp/sbin/dhclient-script dhclient-script
> --- /tmp/sbin/dhclient-script   2004-06-12 16:31:29.000000000 -0500
> +++ dhclient-script     2004-06-13 12:11:56.000000000 -0500
> @@ -128,12 +128,14 @@
>    elif [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0
> ] ) then
>      ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
>                 broadcast 255.255.255.255 up
> +       #Add route to make broadcast work. Do not omit netmask.
> +    route add default dev $interface netmask 0.0.0.0
>    else
>      ifconfig $interface 0 up
>    fi
> 
>    # Add route to make broadcast work. Do not omit netmask.
> -  route add default dev $interface netmask 0.0.0.0
> +  #route add default dev $interface netmask 0.0.0.0
> 
>    # We need to give the kernel some time to get the interface up.
>    sleep 1

The patch essentially backs out the change and returns to what fc2 ships.

I'm cc-ing this to Daniel in case he hasn't seen this.

-- Pete





More information about the devel mailing list