Changeset 10598 in hybrid for branches/releng-9.0/nanobsd


Ignore:
Timestamp:
Apr 26, 2012, 6:42:03 PM (13 years ago)
Author:
rick
Message:

Put it into logical brain ordering...

File:
1 edited

Legend:

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

    r10595 r10598  
    2121
    2222update_pf_conf() {
     23  if is_default_interface; then
     24    new_ext_if_gw=`route -n get default | awk '/gateway/ {print $2}'`
     25    if [ -n "$new_ext_if_gw" ]; then
     26      if [ -a "$new_ext_if_gw" != "$ext_if_gw" ];  then
     27        info "Reloading PF firewall to load new ext_if_gw=$ext_if_gw"
     28        { grep -v '^ext_if_gw=' $rc_conf_running; echo "ext_if_gw=$new_ext_if_gw"; } > $rc_conf_running
     29        /etc/rc.d/pf reload
     30      fi
     31    fi
     32  fi
     33
    2334  # Make sure not to nuke the default route on an ileiden proxy,
    2435  # as it will rendering it usefull
     
    2637
    2738  if checkyesno "service_proxy_normal" && checkyesno "service_accesspoint"; then
    28     if is_default_interface; then
    29       new_ext_if_gw=`route -n get default | awk '/gateway/ {print $2}'`
    30       if [ -n "$new_ext_if_gw" ]; then
    31         if [ -a "$new_ext_if_gw" != "$ext_if_gw" ];  then
    32          info "Reloading PF firewall to load new ext_if_gw=$ext_if_gw"
    33          { grep -v '^ext_if_gw=' $rc_conf_running; echo "ext_if_gw=$new_ext_if_gw"; } > $rc_conf_running
    34          /etc/rc.d/pf reload
    35         fi
    36  
    37         warn "Removing default route as machine is marked as service_proxy AND service_accesspoint"
    38         route -q del default
    39       fi
    40     fi
     39    warn "Removing default route as machine is marked as service_proxy AND service_accesspoint"
     40    route -q del default
    4141  fi
    4242}
Note: See TracChangeset for help on using the changeset viewer.