diff options
author | Chris Buechler <cmb@pfsense.org> | 2008-01-21 06:54:51 +0000 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2008-01-21 06:54:51 +0000 |
commit | b448e2cb0969b70572ae95e7c32414cbdb7b25ab (patch) | |
tree | cba597b6547a888bc4e1326c8b378ce50400415e | |
parent | 17912fda5d4d2ddd296821bc6c85218c032a9482 (diff) | |
download | pfsense-b448e2cb0969b70572ae95e7c32414cbdb7b25ab.zip pfsense-b448e2cb0969b70572ae95e7c32414cbdb7b25ab.tar.gz |
Revert dhclient timeout to the default of 60 seconds. Setting it to 20 minutes
is a bit insane (if you haven't gotten a reply in 60 seconds, you aren't
getting one), and causes systems to hang 20 minutes during
"Configuring WAN" at boot when there is no DHCP server available
on the WAN interface.
-rw-r--r-- | etc/inc/interfaces.inc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 1b4e1e4..f86b657 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -781,10 +781,18 @@ function find_dhclient_process($interface) { } function interfaces_wan_configure() { + + require_once("Timer.php"); + $timer = new Benchmark_Timer; + + $timer->start(); + global $config, $g, $bridges_total; $wancfg = $config['interfaces']['wan']; +$timer->setMarker('marker1'); + if(!$g['booting']) { mute_kernel_msgs(); @@ -793,13 +801,14 @@ function interfaces_wan_configure() { /* remove wanup file if it exists */ unlink_if_exists("{$g['tmp_path']}/wanup"); +$timer->setMarker('marker2'); /* kill PPPoE client (mpd) */ killbypid("{$g['varrun_path']}/mpd.pid"); /* wait for processes to die */ sleep(3); - +$timer->setMarker('marker3'); unlink_if_exists("{$g['varetc_path']}/dhclient_wan.conf"); unlink_if_exists("{$g['varetc_path']}/mpd.conf"); unlink_if_exists("{$g['varetc_path']}/mpd.links"); @@ -811,6 +820,8 @@ function interfaces_wan_configure() { while (mwexec("/sbin/ifconfig " . escapeshellarg($wancfg['if']) . " -alias") == 0); mwexec("/sbin/ifconfig " . escapeshellarg($wancfg['if']) . " down"); +$timer->setMarker('marker4'); + /* wireless configuration? */ if (is_array($wancfg['wireless'])) interfaces_wireless_configure($wancfg['if'], $wancfg['wireless']); @@ -834,6 +845,8 @@ function interfaces_wan_configure() { } } +$timer->setMarker('marker5'); + /* media */ if ($wancfg['media'] || $wancfg['mediaopt']) { $cmd = "/sbin/ifconfig " . escapeshellarg($wancfg['if']); @@ -1089,7 +1102,7 @@ function interfaces_wan_dhcp_configure() { $dhclientconf = ""; $dhclientconf .= <<<EOD -timeout 1200; +timeout 60; retry 1; select-timeout 0; initial-interval 1; |