summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/ifconfig/wireguard.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/wireguard.py b/python/vyos/ifconfig/wireguard.py
index 25c8923f7..ac6dc2109 100644
--- a/python/vyos/ifconfig/wireguard.py
+++ b/python/vyos/ifconfig/wireguard.py
@@ -248,7 +248,7 @@ class WireGuardIf(Interface):
# Endpoint configuration is optional
if {'address', 'port'} <= set(peer):
- if is_ipv6(config['address']):
+ if is_ipv6(peer['address']):
cmd += ' endpoint [{address}]:{port}'
else:
cmd += ' endpoint {address}:{port}'