summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-19 05:29:28 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-19 05:29:28 +0000
commit630cfa6ce6befc10623cfb3001757da5db26e02f (patch)
tree9486944804316bc5b0e21d621352177ac7174ab0
parent69d1e858a23d6deb5596213c08dc969be4292f0c (diff)
downloadpfsense-630cfa6ce6befc10623cfb3001757da5db26e02f.zip
pfsense-630cfa6ce6befc10623cfb3001757da5db26e02f.tar.gz
* Do not destory enc0
* Only run ifconfig if a real ip and netmask exists instead of ifconfig
-rw-r--r--etc/inc/interfaces.inc9
-rw-r--r--etc/inc/vpn.inc4
2 files changed, 7 insertions, 6 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 7abc3d3..11fe309 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1327,9 +1327,10 @@ function interface_configure($interface = "wan")
escapeshellarg($wancfg['ipaddr'] . "/" . $wancfg['subnet']) .
" " . escapeshellarg($wancfg['pointtopoint']) . " up");
} else {
- mwexec("/sbin/ifconfig " . escapeshellarg($realif) .
- " " . escapeshellarg($wancfg['ipaddr'] . "/" .
- $wancfg['subnet']));
+ if($wancfg['ipaddr'] && $wancfg['subnet'])
+ mwexec("/sbin/ifconfig " . escapeshellarg($realif) .
+ " " . escapeshellarg($wancfg['ipaddr'] . "/" .
+ $wancfg['subnet']));
}
}
@@ -1952,4 +1953,4 @@ function get_interface_mac($interface)
return $mac;
}
-?>
+?> \ No newline at end of file
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 67de51e..50e935a 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -134,7 +134,6 @@ function vpn_ipsec_configure($ipchg = false)
if (!isset($ipseccfg['enable'])) {
mwexec("/sbin/ifconfig enc0 down");
- mwexec("/sbin/ifconfig enc0 destroy");
/* kill racoon */
mwexec("/usr/bin/killall racoon", true);
@@ -1478,4 +1477,5 @@ EOD;
return 0;
}
-?>
+
+?> \ No newline at end of file
OpenPOWER on IntegriCloud