From 6717754910504891a298b5ce3ff56adaf4ac617c Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Fri, 10 Aug 2018 18:24:43 +0200 Subject: T666, T616: fix messed up variables in hello source/peer address checking. --- src/conf_mode/vrrp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf_mode/vrrp.py b/src/conf_mode/vrrp.py index 155b71aa8..0f6e531e8 100755 --- a/src/conf_mode/vrrp.py +++ b/src/conf_mode/vrrp.py @@ -255,7 +255,7 @@ def verify(data): raise ConfigError("VRRP group {0} uses IPv4 but its hello-source-address is IPv6".format(group["name"])) if group["peer_address"]: pa = ipaddress.ip_address(group["peer_address"]) - if isinstance(hsa, ipaddress.IPv6Address): + if isinstance(pa, ipaddress.IPv6Address): raise ConfigError("VRRP group {0} uses IPv4 but its peer-address is IPv6".format(group["name"])) if vaddrs6: @@ -265,7 +265,7 @@ def verify(data): raise ConfigError("VRRP group {0} uses IPv6 but its hello-source-address is IPv4".format(group["name"])) if group["peer_address"]: pa = ipaddress.ip_address(group["peer_address"]) - if isinstance(hsa, ipaddress.IPv4Address): + if isinstance(pa, ipaddress.IPv4Address): raise ConfigError("VRRP group {0} uses IPv6 but its peer-address is IPv4".format(group["name"])) # Disallow same VRID on multiple interfaces -- cgit v1.2.3