]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't need to compute network number or broadcast address anymore
authorTed Lemon <source@isc.org>
Thu, 20 Nov 1997 04:36:13 +0000 (04:36 +0000)
committerTed Lemon <source@isc.org>
Thu, 20 Nov 1997 04:36:13 +0000 (04:36 +0000)
client/scripts/linux

index 8e8addab414095032e279debb659e6c2ab74e4f6..e01346150376ddb03842d6fc1b40817b4871c29c 100755 (executable)
 # 4. TIMEOUT not tested. ping has a flag I don't know, and I'm suspicious
 # of the $1 in its args.
 
-############################################################################
-# This horror, which depends on bash, does a bitwise and of the ip
-# address and the network mask to produce the network address.
-eval `echo $new_ip_address $new_subnet_mask | sed -e 's/\([0-9]\+\).\([0-9]\+\).\([0-9]\+\).\([0-9]\+\) \([0-9]\+\).\([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/new_network_address="$[\1\&\5].$[\2\&\6].$[\3\&\7].$[4\&\8]"/'`
-
-# A similar horror to calculate the broadcast address if it's not given.
-if [ x$new_broadcast_address = x ]; then
-  eval `echo $new_ip_address $new_subnet_mask | sed -e 's/\([0-9]\+\).\([0-9]\+\).\([0-9]\+\).\([0-9]\+\) \([0-9]\+\).\([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/new_broadcast_address="$[(\1\|~\5)\&255].$[(\2\|~\6)\&255].$[(\3\|~\7)\&255].$[(4\|~\8)\&255]"/'`
-fi
-
 if [ x$new_broadcast_address != x ]; then
   new_broadcast_arg="broadcast $new_broadcast_address"
 fi