Bug#396545: dhcp3-client: RFC3442 support (The Classless Static Route Option)

2008-06-09 Thread Tim Riker

Any word on a fix for this being included?

I'm on a network now that needs the classless routes in order to 
complete a network installation. I can add a 
/etc/dhcp3/dhclient-exit-hooks.d/rfc3442-classless-routes after the 
install easily enough, but the install fails so I don't get that far.

--
Tim Riker - http://Rikers.org/ - [EMAIL PROTECTED]
Embedded Linux Technologist - http://eLinux.org/
BZFlag maintainer - http://BZFlag.org/ - for fun!
☢ ☛ ¿ǝʇɐɔıʇǝu pooƃ ǝɹnʇɐuƃıs ɹnoʎ uı 8-ɟʇn sı ☚ ☢



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#396545: dhcp3-client: RFC3442 support (The Classless Static Route Option)

2006-11-01 Thread Yauhen Kharuzhy
Package: dhcp3-client
Version: 3.0.4-10
Severity: wishlist
Tags: patch


Dhclient hook for support RFC3442 (The Classless Static Route Option for
Dynamic Host Configuration Protocol (DHCP) version 4) in
dhclient-script.

--
$ cat /etc/dhcp3/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, host-name,
   netbios-name-servers, netbios-scope, interface-mtu,
   rfc3442-classless-static-routes;
--

--
$ cat /etc/dhcp3/dhclient-exit-hooks.d/rfc3442-classless-routes
RUN="yes"


if [ "$RUN" = "yes" ]; then

if [ x"$new_rfc3442_classless_static_routes" != x"" ]; then

if [ x"$reason" == x"BOUND" ]; then
rfc_routes=($new_rfc3442_classless_static_routes)

for(( i=0; i < [EMAIL PROTECTED]; )); do
net_length=${rfc_routes[$i]}

((i++))

net_address=(0 0 0 0)
for(( j=0; j < $[$net_length / 8 + \
($net_length % 8 ? 1 : 0)]; j++, i++)); do

net_address[$j]=${rfc_routes[$i]}
done

gateway=(0 0 0 0)
for (( j=0; j < 4; j++, i++ )); do
gateway[$j]=${rfc_routes[$i]}
done

old_IFS="$IFS"
IFS='.'

if [ x"$net_length" == x"32" ]; then
/sbin/route add -host 
"${net_address[*]}" gw "${gateway[*]}"
else
/sbin/route add -net 
"${net_address[*]}/$net_length" gw "${gateway[*]}"
fi
IFS="$old_IFS"

done

fi
fi
fi



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]