summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-03 18:43:12 +0100
committerChristian Poessinger <christian@poessinger.com>2022-01-03 18:44:14 +0100
commitb64dbabe1ccacba7154391118de481086f1dcc19 (patch)
treecbc87b316e1ef5550fc15f245d5a4d997ecc58f3 /src
parentca3cd970f2973ebfc8c8784ead73bbd582d30d54 (diff)
downloadvyos-1x-b64dbabe1ccacba7154391118de481086f1dcc19.tar.gz
vyos-1x-b64dbabe1ccacba7154391118de481086f1dcc19.zip
test: vyos.validate: also test interface identifier in is_ipv6_link_local()
Diffstat (limited to 'src')
-rw-r--r--src/tests/test_validate.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tests/test_validate.py b/src/tests/test_validate.py
index b43dbd97e..68a257d25 100644
--- a/src/tests/test_validate.py
+++ b/src/tests/test_validate.py
@@ -30,8 +30,12 @@ class TestVyOSValidate(TestCase):
self.assertFalse(vyos.validate.is_ipv6_link_local('169.254.0.1'))
self.assertTrue(vyos.validate.is_ipv6_link_local('fe80::'))
self.assertTrue(vyos.validate.is_ipv6_link_local('fe80::affe:1'))
+ self.assertTrue(vyos.validate.is_ipv6_link_local('fe80::affe:1%eth0'))
self.assertFalse(vyos.validate.is_ipv6_link_local('2001:db8::'))
+ self.assertFalse(vyos.validate.is_ipv6_link_local('2001:db8::%eth0'))
self.assertFalse(vyos.validate.is_ipv6_link_local('VyOS'))
+ self.assertFalse(vyos.validate.is_ipv6_link_local('::1'))
+ self.assertFalse(vyos.validate.is_ipv6_link_local('::1%lo'))
def test_is_ipv6_link_local(self):
self.assertTrue(vyos.validate.is_loopback_addr('127.0.0.1'))