From 221940c94bf24c5adf4107f8a07ae60d7eefe49f Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 20 Nov 2020 14:36:55 +0100 Subject: 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. --- python/vyos/ifconfig/wireguard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}' -- cgit v1.2.3