summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-08-20 12:33:12 +0000
committerErmal <eri@pfsense.org>2010-08-20 12:33:12 +0000
commitdea80743c6473802b016250ab37d49061c5b2b07 (patch)
tree07e1c19a7de91cf47b6b8c984873bc0d1afa7fb9
parent88c00a6569d6080230a972b2de5e1c6c0c1c098b (diff)
downloadpfsense-dea80743c6473802b016250ab37d49061c5b2b07.zip
pfsense-dea80743c6473802b016250ab37d49061c5b2b07.tar.gz
Ticket #684. Dispatch the reloading of the interface in dial-on-demand case to easy the GUI responsivess.
-rw-r--r--etc/inc/interfaces.inc5
-rwxr-xr-xetc/rc.interfaces_wan_configure8
2 files changed, 9 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 057c684..e1735b3 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -844,9 +844,8 @@ function interface_bring_down($interface = "wan", $destroy = false) {
sleep(2);
}
unlink_if_exists("{$g['varetc_path']}/mpd_{$interface}.conf");
- if (isset($ppp['ondemand']) && !$destroy) {
- interface_configure($interface);
- }
+ if (isset($ppp['ondemand']) && !$destroy)
+ file_put_contents("{$g['tmp_path']}/interface_configure", $interface);
break;
}
}
diff --git a/etc/rc.interfaces_wan_configure b/etc/rc.interfaces_wan_configure
index 02063f5..3969777 100755
--- a/etc/rc.interfaces_wan_configure
+++ b/etc/rc.interfaces_wan_configure
@@ -34,6 +34,12 @@ require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
-interface_configure("wan");
+$argument = str_replace("\n", "", $argv[1]);
+if (empty($argument))
+ interface_configure("wan");
+else {
+ if (!empty($config['interfaces'][$argument]))
+ interface_configure($argument);
+}
?>
OpenPOWER on IntegriCloud