fix: removed unnecressary peer ID handling that is no longer required for >=5.0 StrongSwan.
Release / release (push) Successful in 17s

This commit is contained in:
slawek committed 2026-10-23 17:31:22 +02:00
1 parent 64da0cf97f
commit 5402256ef6
5 files changed
+30 -7

No files matched your search

@@ -190,6 +190,12 @@ def validate(cfg):
raise ConfigError(
f'{section}.{option} is required in mode {mode or "manual"}')
for section, option in (('wan', 'local_fqdn'), ('remote', 'id')):
if str(_get(cfg, section, option)).startswith('@'):
raise ConfigError(
f'{section}.{option}: remove the leading @; strongSwan reads an '
'address as an IP identity and a name as an FQDN')
id_mode = _get(cfg, 'wan', 'local_id_mode')
if id_mode and id_mode not in ID_MODES:
raise ConfigError(
@@ -424,7 +430,7 @@ def build_context(cfg, local_id_override=None):
if local_id_override:
local_id = local_id_override
elif id_mode == 'fqdn':
local_id = f'@{local_fqdn}' if local_fqdn else ''
local_id = local_fqdn
elif id_mode == 'internal_ip':
local_id = int_addr
else: