Project

General

Profile

« Previous | Next » 

Revision 3aea6230

Added by Renato Botelho almost 6 years ago

IPSec: Just destroy interface if it exists and it's not booting

Based on PR: https://github.com/pfsense/pfsense/pull/4076

View differences:

src/etc/inc/interfaces.inc
1425 1425
			continue;
1426 1426
		}
1427 1427
		// Create IPsec interface
1428
		if (platform_booting() || !does_interface_exist($ipsecif)) {
1428
		if (!platform_booting() && does_interface_exist($ipsecif)) {
1429 1429
			mwexec("/sbin/ifconfig " . escapeshellarg($ipsecif) . " destroy", false);
1430
			mwexec("/sbin/ifconfig " . escapeshellarg($ipsecif) . " create reqid " . escapeshellarg($ipsecifnum), false);
1431
		} else {
1432
			mwexec("/sbin/ifconfig " . escapeshellarg($ipsecif) . " create reqid " . escapeshellarg($ipsecifnum), false);
1433 1430
		}
1431
		mwexec("/sbin/ifconfig " . escapeshellarg($ipsecif) . " create reqid " . escapeshellarg($ipsecifnum), false);
1434 1432

  
1435 1433
		/* Apply the outer tunnel addresses to the interface */
1436 1434
		$inet = is_ipaddrv6($left_spec) ? "inet6" : "inet";

Also available in: Unified diff