summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-07-21 20:48:12 +0000
committerErmal <eri@pfsense.org>2010-07-21 20:48:12 +0000
commit64e6490a7b852c04e3448c83e3dd31ab6d5f5952 (patch)
tree96b255342b3076caf7a2bc0fa8c6b552fa57bf38 /etc
parentfb86a74b80b2da0c104b09314526733bf9b46185 (diff)
downloadpfsense-64e6490a7b852c04e3448c83e3dd31ab6d5f5952.zip
pfsense-64e6490a7b852c04e3448c83e3dd31ab6d5f5952.tar.gz
Ticket #667. Take another approach at handling dial-on-demand and Connect/Disconnect button. If the link is chosen for dial on demand during a disconnect request it will be brough up again instead of just leaving it down so traffic will flow easily when there is a request.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index dc4cbdf..aaeef0b 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -819,10 +819,12 @@ function interface_bring_down($interface = "wan", $destroy = false) {
if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
if ($realif == $ppp['if']) {
- if (!isset($ppp['ondemand'])) {
- killbypid("{$g['varrun_path']}/{$ifcfg['ipaddr']}_{$interface}.pid");
- sleep(2);
- unlink_if_exists("{$g['varetc_path']}/mpd_{$interface}.conf");
+ killbypid("{$g['varrun_path']}/{$ifcfg['ipaddr']}_{$interface}.pid");
+ sleep(2);
+ unlink_if_exists("{$g['varetc_path']}/mpd_{$interface}.conf");
+ if (isset($ppp['ondemand'])) {
+ $destroy = false;
+ interface_configure("wan");
}
break;
}
OpenPOWER on IntegriCloud