summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-04-26 20:28:15 +0000
committerErmal Luçi <eri@pfsense.org>2009-04-26 20:28:15 +0000
commit87d7a566905ded318fcf13ddcc13a97fa15914aa (patch)
treea5f42e963f53b7c31aebf3b5d15382e0751a14c3 /etc
parent00f9e567fddbb6597b9c6a977deb88e71c001468 (diff)
downloadpfsense-87d7a566905ded318fcf13ddcc13a97fa15914aa.zip
pfsense-87d7a566905ded318fcf13ddcc13a97fa15914aa.tar.gz
Separate delete down actions on ifconfig to fix issues. Add L2TP virtual interafce to a list.
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 07d1be6..6725ef3 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -796,6 +796,7 @@ function interface_bring_down($interface = "wan", $destroy = false) {
/* remove interface up file if it exists */
unlink_if_exists("{$g['tmp_path']}/{$realif}up");
unlink_if_exists("{$g['vardb_path']}/{$interface}ip");
+ unlink_if_exists("/tmp/{$realif}_router");
//unlink_if_exists("{$g['varetc_path']}/nameservers.conf");
switch ($ifcfg['ipaddr']) {
@@ -822,10 +823,12 @@ function interface_bring_down($interface = "wan", $destroy = false) {
mwexec("kill {$pid}");
sleep(1);
unlink_if_exists("{$g['varetc_path']}/dhclient_{$interface}.conf");
- mwexec("/sbin/ifconfig {$realif} delete down");
+ mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " delete");
+ mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " down");
break;
default:
- mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " delete down");
+ mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " delete");
+ mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " down");
break;
}
@@ -834,7 +837,6 @@ function interface_bring_down($interface = "wan", $destroy = false) {
mwexec("/sbin/ifconfig {$realif} destroy");
}
- unlink_if_exists("/tmp/{$realif}_router");
return;
}
@@ -2290,7 +2292,7 @@ function get_interface_ip($interface = "wan") {
function get_interface_subnet($interface = "wan") {
$realif = get_real_interface($interface);
/* Do we really come here for these interfaces ?! */
- if (in_array($realif, array("pptp", "pppoe", "openvpn", "enc0" /* , "ppp" */)))
+ if (in_array($realif, array("pptp", "pppoe", "l2tp", "openvpn", "enc0" /* , "ppp" */)))
return "";
$cursn = find_interface_subnet($realif);
OpenPOWER on IntegriCloud