Do not spawn strongswan ipsec for admin down connections

Related-Prod: PRODX-3456
Change-Id: I9b053aa11ed03cdb8d441ca05c7e8faabe1fc140
This commit is contained in:
Vasyl Saienko 2022-12-23 09:41:34 +00:00
parent d1b1f94b1b
commit 6e2e924fed

View File

@ -193,6 +193,8 @@ class StrongSwanProcess(ipsec.BaseSwanProcess):
self._execute([self.binary, 'start'])
# initiate ipsec connection
for ipsec_site_conn in self.vpnservice['ipsec_site_connections']:
if not ipsec_site_conn['admin_state_up']:
continue
self._execute([self.binary, 'stroke', 'up-nb',
ipsec_site_conn['id']])