summaryrefslogtreecommitdiff
path: root/src/validators/ipv6-link-local
diff options
context:
space:
mode:
Diffstat (limited to 'src/validators/ipv6-link-local')
-rw-r--r--src/validators/ipv6-link-local12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/validators/ipv6-link-local b/src/validators/ipv6-link-local
new file mode 100644
index 0000000..6ac3ea7
--- /dev/null
+++ b/src/validators/ipv6-link-local
@@ -0,0 +1,12 @@
+#!/usr/bin/python3
+
+import sys
+from vyos.utils.network import is_ipv6_link_local
+
+if __name__ == '__main__':
+ if len(sys.argv)>1:
+ addr = sys.argv[1]
+ if not is_ipv6_link_local(addr):
+ sys.exit(1)
+
+ sys.exit(0)