add_new_routes(){ # RFC 3442: If the DHCP server returns both a Classless Static # Routes option and a Router option, the DHCP client MUST ignore # the Router option. # # DHCP clients that support this option (Classless Static Routes) # MUST NOT install the routes specified in the Static Routes # option (option code 33) if both a Static Routes option and the # Classless Static Routes option are provided. if [ -n "$new_classless_routes" ]; then fill_classless_routes "$new_classless_routes" $LOGGER "New Classless Static Routes ($interface): $classless_routes" set $classless_routes while [ $# -gt 1 ]; do if [ "0.0.0.0" = "$2" ]; then route add "$1" -iface "$interface" else route add "$1" "$2" fi shift; shift done return fi for router in $new_routers; do # Here comes the copy 'n pasted part if is_default_interface; then if [ "$new_ip_address" = "$router" ]; then route add default -iface $router >/dev/null 2>&1 else if [ "$new_subnet_mask" = "255.255.255.255" ]; then route add "$router" -iface "$interface" >/dev/null 2>&1 fi route add default $router >/dev/null 2>&1 fi fi # /usr/local/sbin/ifctl -i ${interface} -4rd -a ${router} # This is the original line from the opnsense script, which i commented out...