Index: sbin/dhclient/dhclient-script =================================================================== --- sbin/dhclient/dhclient-script +++ sbin/dhclient/dhclient-script @@ -22,6 +22,7 @@ ARP=/usr/sbin/arp HOSTNAME=/bin/hostname IFCONFIG='/sbin/ifconfig -n' +FIB=`sysctl -qn net.my_fibnum` LOCALHOST=127.0.0.1 @@ -54,7 +55,7 @@ } delete_old_address() { - eval "$IFCONFIG $interface inet -alias $old_ip_address $medium" + eval "$IFCONFIG $interface inet -alias $old_ip_address fib $FIB $medium" } add_new_address() { @@ -62,6 +63,7 @@ inet $new_ip_address \ netmask $new_subnet_mask \ broadcast $new_broadcast_address \ + fib $FIB \ $medium" $LOGGER "New IP Address ($interface): $new_ip_address" @@ -72,7 +74,7 @@ delete_old_alias() { if [ -n "$alias_ip_address" ]; then - $IFCONFIG $interface inet -alias $alias_ip_address > /dev/null 2>&1 + $IFCONFIG $interface inet -alias $alias_ip_address fib $FIB > /dev/null 2>&1 #route delete $alias_ip_address $LOCALHOST > /dev/null 2>&1 fi } @@ -80,7 +82,7 @@ add_new_alias() { if [ -n "$alias_ip_address" ]; then $IFCONFIG $interface inet alias $alias_ip_address netmask \ - $alias_subnet_mask + $alias_subnet_mask fib $FIB #route add $alias_ip_address $LOCALHOST fi } @@ -158,9 +160,9 @@ set $classless_routes while [ $# -gt 1 ]; do if [ "0.0.0.0" = "$2" ]; then - route add "$1" -iface "$interface" + route add "$1" -iface "$interface" -fib $FIB else - route add "$1" "$2" + route add "$1" "$2" -fib $FIB fi shift; shift done @@ -171,9 +173,9 @@ if is_default_interface; then if [ "$new_ip_address" = "$router" ]; then - route add default -iface $router >/dev/null 2>&1 + route add default -iface $router -fib $FIB >/dev/null 2>&1 else - route add default $router >/dev/null 2>&1 + route add default $router -fib $FIB >/dev/null 2>&1 fi fi # 2nd and subsequent default routers error out, so explicitly @@ -185,7 +187,7 @@ $LOGGER "New Static Routes ($interface): $new_static_routes" set $new_static_routes while [ $# -gt 1 ]; do - route add $1 $2 + route add $1 $2 -fib $FIB shift; shift done fi @@ -314,13 +316,13 @@ case $reason in MEDIUM) eval "$IFCONFIG $interface $medium" - eval "$IFCONFIG $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1 + eval "$IFCONFIG $interface inet -alias 0.0.0.0 fib $FIB $medium" >/dev/null 2>&1 sleep 1 ;; PREINIT) delete_old_alias - $IFCONFIG $interface inet alias 0.0.0.0 netmask 255.0.0.0 broadcast 255.255.255.255 up + $IFCONFIG $interface inet alias 0.0.0.0 netmask 255.0.0.0 broadcast 255.255.255.255 fib $FIB up ;; ARPCHECK|ARPSEND) @@ -398,7 +400,7 @@ fi fi fi - eval "$IFCONFIG $interface inet -alias $new_ip_address $medium" + eval "$IFCONFIG $interface inet -alias $new_ip_address fib $FIB $medium" delete_old_routes exit_with_hooks 1 ;;