Skip to content

Commit 337a55e

Browse files
committed
network/dhclient-script: also parse dot separated $new_classless_static_routes
Previously our dhclient-script expected that $new_classless_static_routes will have all values separated by a whitespace. But at least on F25 dhclient will put there the destination descriptor in the same format as it is used by ISC dhcp-server. For example: new_classless_static_routes=32.10.198.122.47 192.168.78.4 while our current code expects new_classless_static_routes=32 10 198 122 47 192 168 78 4 So let's just accept both of these formats by adding "." to IFS. For details plesse see https://tools.ietf.org/html/rfc3442 "Classless Route Option Format"
1 parent a0d129e commit 337a55e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules.d/40network/dhclient-script.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ case $reason in
191191
echo '. /lib/net-lib.sh'
192192
echo "setup_net $netif"
193193
if [ -n "$new_classless_static_routes" ]; then
194+
OLDIFS="$IFS"
195+
IFS=".$IFS"
194196
parse_option_121 $new_classless_static_routes
197+
IFS="$OLDIFS"
195198
fi
196199
echo "source_hook initqueue/online $netif"
197200
[ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"

0 commit comments

Comments
 (0)