summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-03-23 15:19:35 +0100
committerGitHub <noreply@github.com>2023-03-23 15:19:35 +0100
commit8da2b48ab6ff913cfa86730d86870cc7e2effeec (patch)
treeaca5880a376ce88746583b95c4bee7168d5bd1d5 /src
parent7380bf1216399f905fe85ff26eaa0272b9f6dfe0 (diff)
parent62875954a6679e1124cd727187f64bd37ec4678f (diff)
downloadvyos-1x-8da2b48ab6ff913cfa86730d86870cc7e2effeec.tar.gz
vyos-1x-8da2b48ab6ff913cfa86730d86870cc7e2effeec.zip
Merge pull request #1910 from sarthurdev/ipsec_test
ipsec: T5003: Resolve issue with IPsec DHCP test
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vpn_ipsec.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/conf_mode/vpn_ipsec.py b/src/conf_mode/vpn_ipsec.py
index d207c63df..63887b278 100755
--- a/src/conf_mode/vpn_ipsec.py
+++ b/src/conf_mode/vpn_ipsec.py
@@ -549,6 +549,8 @@ def generate(ipsec):
if ipsec['dhcp_no_address']:
with open(DHCP_HOOK_IFLIST, 'w') as f:
f.write(" ".join(ipsec['dhcp_no_address'].values()))
+ elif os.path.exists(DHCP_HOOK_IFLIST):
+ os.unlink(DHCP_HOOK_IFLIST)
for path in [swanctl_dir, CERT_PATH, CA_PATH, CRL_PATH, PUBKEY_PATH]:
if not os.path.exists(path):