FIX issue on preshared key if we disable/enable remote access vpn

Way to reproduce the issue
(1) enable remote access vpn
root@r-8349-VM:~# cat /etc/ipsec.d/ipsec.any.secrets
: PSK "mVSx5KDXCPYX7X5DGb2W8yNW"

(2) disable/enable vpn
root@r-8349-VM:~# cat /etc/ipsec.d/ipsec.any.secrets
: PSK "mVSx5KDXCPYX7X5DGb2W8yNW"
: PSK "HeV3dHZpZXt4chhfvhx8D83C"

Expected configuration:
root@r-8349-VM:~# cat /etc/ipsec.d/ipsec.any.secrets
: PSK "HeV3dHZpZXt4chhfvhx8D83C"
This commit is contained in:
Wei Zhou 2017-01-05 12:14:13 +01:00
parent 41f7eb6290
commit 16c2cd0244

View File

@ -659,6 +659,7 @@ class CsRemoteAccessVpn(CsDataBag):
secret = CsFile(vpnsecretfilte)
secret.empty()
secret.addeq(": PSK \"%s\"" %psk)
secret.commit()