summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-20 14:36:55 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-20 14:41:37 +0100
commit221940c94bf24c5adf4107f8a07ae60d7eefe49f (patch)
tree7916750021c8a26da6b94c2d6903952ec17a8277
parent49be767ce95d28fd55a15b67876bd23a533d3982 (diff)
downloadvyos-1x-221940c94bf24c5adf4107f8a07ae60d7eefe49f.tar.gz
vyos-1x-221940c94bf24c5adf4107f8a07ae60d7eefe49f.zip
wireguard: T2653: fix IPv6 peer address configuration
While migration to get_config_dict() was introduced in commit 789775af9f5 the logic for adding an IPv4 or IPv6 peer address was using the wrong dictionary to determine if it's an IPv4 or IPv6 address. We now use the proper peer dict over the wrong config dict.
-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}'