summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient-script
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-06-01 22:23:58 +0000
committerErmal <eri@pfsense.org>2010-06-01 22:23:58 +0000
commit155e343b82373e216272b9e85944d8510106c636 (patch)
tree1bae09b6146910a8c4c35535bd33c3c928b62abc /sbin/dhclient-script
parentf73be85cfd6ea44d545183cc9b7874d6db33de68 (diff)
downloadpfsense-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-xsbin/dhclient-script5
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"
OpenPOWER on IntegriCloud