summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-06-16 11:01:24 +0000
committerErmal <eri@pfsense.org>2010-06-16 11:01:24 +0000
commita138f4fbc077f89ff413355ba738e00d36317973 (patch)
treee1e9ded92080fa08c07f65a9dda01f849a7f39e2 /etc
parent0bbf8900e0e4288e49f432f83ead8ac8949fbb58 (diff)
downloadpfsense-a138f4fbc077f89ff413355ba738e00d36317973.zip
pfsense-a138f4fbc077f89ff413355ba738e00d36317973.tar.gz
Fixes #667. Do not bring down mpd5 if the interface is configured for dial on-demand.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc15
1 files changed, 12 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 84e1376..65d61d5 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -812,9 +812,18 @@ function interface_bring_down($interface = "wan", $destroy = false) {
case "pppoe":
case "pptp":
case "l2tp":
- killbypid("{$g['varrun_path']}/{$ifcfg['ipaddr']}_{$interface}.pid");
- sleep(2);
- unlink_if_exists("{$g['varetc_path']}/mpd_{$interface}.conf");
+ 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");
+ }
+ break;
+ }
+ }
+ }
break;
case "carpdev-dhcp":
/*
OpenPOWER on IntegriCloud