mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
IPSec: Just destroy interface if it exists and it's not booting
Based on PR: https://github.com/pfsense/pfsense/pull/4076
This commit is contained in:
parent
03cdd6ad04
commit
f8c4bfc52a
@ -1427,12 +1427,10 @@ function interface_ipsec_vti_configure($ph1ent) {
|
||||
continue;
|
||||
}
|
||||
// Create IPsec interface
|
||||
if (platform_booting() || !does_interface_exist($ipsecif)) {
|
||||
if (!platform_booting() && does_interface_exist($ipsecif)) {
|
||||
mwexec("/sbin/ifconfig " . escapeshellarg($ipsecif) . " destroy", false);
|
||||
mwexec("/sbin/ifconfig " . escapeshellarg($ipsecif) . " create reqid " . escapeshellarg($ipsecifnum), false);
|
||||
} else {
|
||||
mwexec("/sbin/ifconfig " . escapeshellarg($ipsecif) . " create reqid " . escapeshellarg($ipsecifnum), false);
|
||||
}
|
||||
mwexec("/sbin/ifconfig " . escapeshellarg($ipsecif) . " create reqid " . escapeshellarg($ipsecifnum), false);
|
||||
|
||||
/* Apply the outer tunnel addresses to the interface */
|
||||
$inet = is_ipaddrv6($left_spec) ? "inet6" : "inet";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user