summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-01-25 11:11:57 +0100
committerChristian Poessinger <christian@poessinger.com>2020-01-25 11:11:57 +0100
commit7dbb6ec597f8ffe747a6630b79a2b9ba2afcc30f (patch)
tree5937203a2ac093b570cd2d246caa19efa241ff3e /python
parentb818b5cdae5bfc46d7f65c7f398fe37485513dd1 (diff)
downloadvyos-1x-7dbb6ec597f8ffe747a6630b79a2b9ba2afcc30f.tar.gz
vyos-1x-7dbb6ec597f8ffe747a6630b79a2b9ba2afcc30f.zip
vyos.validate: improve is_ipv6_link_local() logic
Diffstat (limited to 'python')
-rw-r--r--python/vyos/validate.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/validate.py b/python/vyos/validate.py
index b6d8f23b8..33c495d91 100644
--- a/python/vyos/validate.py
+++ b/python/vyos/validate.py
@@ -57,8 +57,8 @@ def is_ipv6_link_local(addr):
Check addr if it is an IPv6 link-local address/network. Returns True/False
"""
+ addr = addr.split('%')[0]
if is_ipv6(addr):
- addr = addr.split('%')[0]
if ipaddress.IPv6Address(addr).is_link_local:
return True