Ignore:
Timestamp:
May 2, 2012, 9:50:50 PM (13 years ago)
Author:
rick
Message:

Convert script to one compatible with shadow route table idea.

Related-To: nodefactory#129

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-9.0/nanobsd/files/etc/dhclient-exit-hooks

    r10609 r10651  
    2222    $LOGGER "curr default gateway: $new_ext_if_gw"
    2323    if [ -n "$new_ext_if_gw" -a "$new_ext_if_gw" != "$ext_if_gw" ];  then
    24       $LOGGER "Reloading PF firewall to load new ext_if_gw=$new_ext_if_gw"
     24      $LOGGER "Syncing new default route ($new_ext_if_gw) to routing table 1"
    2525      { grep -v '^ext_if_gw=' $rc_conf_running; echo "ext_if_gw=$new_ext_if_gw"; } > $rc_conf_running
    26       $LOGGER "`/etc/rc.d/pf reload 2>&1`"
     26      $LOGGER "`setfib 1 route -q del default 2>&1`"
     27      $LOGGER "`setfib 1 route -q add default $new_ext_if_gw 2>&1`"
    2728    fi
    2829  else
     
    3536
    3637  if [ -n "$new_ext_if_gw" ] && checkyesno "service_proxy_normal" && checkyesno "service_accesspoint"; then
    37     $LOGGER "Removing default route as machine is marked as service_proxy AND service_accesspoint"
     38    $LOGGER "Removing default route from routing table 0 as machine is marked as service_proxy AND service_accesspoint"
    3839    $LOGGER "`route -q del default 2>&1`"
    3940  fi
Note: See TracChangeset for help on using the changeset viewer.