summaryrefslogtreecommitdiff
path: root/python/vyos/validate.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-12-06 18:13:31 +0100
committerChristian Poessinger <christian@poessinger.com>2020-12-06 18:13:31 +0100
commitd247736f67cc056062b75a4215a031bebcfee2ee (patch)
tree9670119cd318c2299afd8a1d93605b2f73dc5357 /python/vyos/validate.py
parent2bfe25d4376f3b410906d157c3f9cdfd07fe79f2 (diff)
downloadvyos-1x-d247736f67cc056062b75a4215a031bebcfee2ee.tar.gz
vyos-1x-d247736f67cc056062b75a4215a031bebcfee2ee.zip
vyos.ifconfig: T1579: do not remove IPv6 link-local address on reconfiguration
Diffstat (limited to 'python/vyos/validate.py')
-rw-r--r--python/vyos/validate.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/validate.py b/python/vyos/validate.py
index 84a7bc2de..98bd40f74 100644
--- a/python/vyos/validate.py
+++ b/python/vyos/validate.py
@@ -27,11 +27,11 @@ from vyos.util import cmd
def is_ipv6_link_local(addr):
""" Check if addrsss is an IPv6 link-local address. Returns True/False """
- from ipaddress import IPv6Address
+ from ipaddress import ip_interface
from vyos.template import is_ipv6
addr = addr.split('%')[0]
if is_ipv6(addr):
- if IPv6Address(addr).is_link_local:
+ if ip_interface(addr).is_link_local:
return True
return False