summaryrefslogtreecommitdiff
path: root/src/validators/ipv6-address
diff options
context:
space:
mode:
authorkumvijaya <kumvijaya@gmail.com>2024-05-21 16:41:14 +0530
committerkumvijaya <kumvijaya@gmail.com>2024-05-21 16:41:14 +0530
commitcc86483fdf7a6bd988f485c06402fd07368dd26e (patch)
tree9d892a9715106cc67bf1e57b15b999aa7e564057 /src/validators/ipv6-address
parent704ca2322d0bebcb923f5136f0f69fb23651a484 (diff)
downloadvyos-workflow-test-temp-cc86483fdf7a6bd988f485c06402fd07368dd26e.tar.gz
vyos-workflow-test-temp-cc86483fdf7a6bd988f485c06402fd07368dd26e.zip
T6357: create test repository to validate setup
Diffstat (limited to 'src/validators/ipv6-address')
-rw-r--r--src/validators/ipv6-address10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/validators/ipv6-address b/src/validators/ipv6-address
new file mode 100644
index 0000000..1fca776
--- /dev/null
+++ b/src/validators/ipv6-address
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+ipaddrcheck --is-ipv6-single $1
+
+if [ $? -gt 0 ]; then
+ echo "Error: $1 is not a valid IPv6 address"
+ exit 1
+fi
+
+exit 0 \ No newline at end of file