summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-03 09:53:37 +0100
committerGitHub <noreply@github.com>2022-01-03 09:53:37 +0100
commit4743b91f4eb98bc2b4d5eee1d2f4d06e10ec032e (patch)
treea0b285361bfa5e1c703604448ae0afdef84936aa /src
parent901e40dc3b52fb3d8dc7308f54da42b858b61798 (diff)
parent1da1701ce75d0685a0587ce6f0365a0be447c662 (diff)
downloadvyos-1x-4743b91f4eb98bc2b4d5eee1d2f4d06e10ec032e.tar.gz
vyos-1x-4743b91f4eb98bc2b4d5eee1d2f4d06e10ec032e.zip
Merge pull request #1124 from sever-sever/T4110
listen-address: T4110: Ability to set IPv6 link-local addresses
Diffstat (limited to 'src')
-rwxr-xr-xsrc/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 100755
index 000000000..05e693b77
--- /dev/null
+++ b/src/validators/ipv6-link-local
@@ -0,0 +1,12 @@
+#!/usr/bin/python3
+
+import sys
+from vyos.validate 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)