summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-08-17 21:53:50 +0200
committerGitHub <noreply@github.com>2023-08-17 21:53:50 +0200
commit49f25c568c91750e06bb982ae0321d4448fbddbb (patch)
treef3a48a845e03603a4c4fff8913bc82f1b230e375 /src
parent214d0d4933e90cbe9440280d916f069b9db463fc (diff)
parent6bd061100ae43bc3a8319408f5123ec9bde3f2b8 (diff)
downloadvyos-1x-49f25c568c91750e06bb982ae0321d4448fbddbb.tar.gz
vyos-1x-49f25c568c91750e06bb982ae0321d4448fbddbb.zip
Merge pull request #2130 from aapostoliuk/T5409-sagitta
wireguard: T5409: Added 'set interfaces wireguard wgX threaded'
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-wireguard.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces-wireguard.py b/src/conf_mode/interfaces-wireguard.py
index 446399255..122d9589a 100755
--- a/src/conf_mode/interfaces-wireguard.py
+++ b/src/conf_mode/interfaces-wireguard.py
@@ -90,7 +90,6 @@ def verify(wireguard):
# run checks on individual configured WireGuard peer
public_keys = []
-
for tmp in wireguard['peer']:
peer = wireguard['peer'][tmp]
@@ -107,8 +106,9 @@ def verify(wireguard):
if peer['public_key'] in public_keys:
raise ConfigError(f'Duplicate public-key defined on peer "{tmp}"')
- if 'disable' not in peer and is_wireguard_key_pair(wireguard['private_key'], peer['public_key']):
- raise ConfigError(f'Peer "{tmp}" has the same public key as the interface "{wireguard["ifname"]}"')
+ if 'disable' not in peer:
+ if is_wireguard_key_pair(wireguard['private_key'], peer['public_key']):
+ raise ConfigError(f'Peer "{tmp}" has the same public key as the interface "{wireguard["ifname"]}"')
public_keys.append(peer['public_key'])