diff options
author | Ermal <eri@pfsense.org> | 2010-07-21 20:48:12 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-07-21 20:48:12 +0000 |
commit | 64e6490a7b852c04e3448c83e3dd31ab6d5f5952 (patch) | |
tree | 96b255342b3076caf7a2bc0fa8c6b552fa57bf38 /etc/inc | |
parent | fb86a74b80b2da0c104b09314526733bf9b46185 (diff) | |
download | pfsense-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/inc')
-rw-r--r-- | etc/inc/interfaces.inc | 10 |
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; } |