diff options
author | Ermal <eri@pfsense.org> | 2010-06-01 22:23:58 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-06-01 22:23:58 +0000 |
commit | 155e343b82373e216272b9e85944d8510106c636 (patch) | |
tree | 1bae09b6146910a8c4c35535bd33c3c928b62abc /sbin/dhclient-script | |
parent | f73be85cfd6ea44d545183cc9b7874d6db33de68 (diff) | |
download | pfsense-155e343b82373e216272b9e85944d8510106c636.zip pfsense-155e343b82373e216272b9e85944d8510106c636.tar.gz |
Do not use netstat to fetch default gateway interface but other faster commands to avoid problems on large interface setups.
Diffstat (limited to 'sbin/dhclient-script')
-rwxr-xr-x | sbin/dhclient-script | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/dhclient-script b/sbin/dhclient-script index 35ce76f..132946d 100755 --- a/sbin/dhclient-script +++ b/sbin/dhclient-script @@ -211,9 +211,8 @@ if [ -f /etc/dhclient-enter-hooks ]; then fi fi -if [ -x $NETSTAT ]; then - $LOGGER "netstat" - if_defaultroute=`$NETSTAT -rn | $GREP "^default" | $AWK '{print $6}'` +if [ -x $ROUTE ]; then + if_defaultroute=`$ROUTE get default | $GREP interface | $AWK '{print $2}'` else $LOGGER "if_defaultroute" if_defaultroute="x" |