diff options
author | Chris Buechler <cmb@pfsense.org> | 2016-04-14 21:30:54 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-04-14 21:31:41 -0500 |
commit | 82ea06cb5e76b6cdb761e68c61cec23ccd5b956b (patch) | |
tree | be6a39c3642fc753e93a8e6cf05cefa6728b29a7 /src/etc | |
parent | 4d7f79a00fe6c3b1e58f85fae213390c916ab90a (diff) | |
download | pfsense-82ea06cb5e76b6cdb761e68c61cec23ccd5b956b.zip pfsense-82ea06cb5e76b6cdb761e68c61cec23ccd5b956b.tar.gz |
Add lock in vpn_ipsec_configure. Ticket #6160
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/vpn.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc index 4265004..bca533e 100644 --- a/src/etc/inc/vpn.inc +++ b/src/etc/inc/vpn.inc @@ -152,6 +152,8 @@ function vpn_ipsec_convert_to_modp($index) { function vpn_ipsec_configure($restart = false) { global $config, $g, $sa, $sn, $p1_ealgos, $p2_ealgos, $ipsec_idhandling; + $ipsecstartlock = lock('ipsec', LOCK_EX); + /* get the automatic ping_hosts.sh ready */ unlink_if_exists("{$g['vardb_path']}/ipsecpinghosts"); touch("{$g['vardb_path']}/ipsecpinghosts"); @@ -174,6 +176,7 @@ function vpn_ipsec_configure($restart = false) { /* IPSEC is off, shutdown enc interface.*/ mwexec("/sbin/ifconfig enc0 down"); + unlock($ipsecstartlock); return 0; } @@ -1495,6 +1498,7 @@ EOD; echo "done\n"; } + unlock($ipsecstartlock); return count($filterdns_list); } |