ifconfig.sh execs this code when in routes there is no "-net" or "-host" to determine what it is: ####################### if [[ ${y} == *.*.*.* && ${y} != *.*.*.0 && ${y} != *.*.*.0/* ]] ; then x="-host ${x}" else x="-net ${x}" fi ####################### I thik this code contains bad logic: 1) ${y} != *.*.*.0 There is hosts, that ends in .0 it is error to make this net. If someone want such advanced logic, then it must use ip classes. Because for A class 10.2.2.0 is the host ip. It should be matched as *.0.0.0 to be correct. There will be error: # route add -net 10.2.2.0 gw GW_IP SIOCADDRT: Invalid argument 2) ${y} != *.*.*.0/* a) There is nets not ending in .0 and so 10.2.2.128/25 will end in error. b) 192.168.14.0/32 - is host, and not net. # route add -net 192.168.14.0/32 gw GW_IP SIOCADDRT: Invalid argument
Fixed in 1.12.7 and 1.13.0_alpha9 Basically we now assume a host unless a netmask or a cidr is provided (/32 is now a host)