summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2024-09-27 13:52:32 +0100
committerGitHub <noreply@github.com>2024-09-27 13:52:32 +0100
commitfaab3c22e66b7eb34485c71edbf92cb00e74be26 (patch)
treedb3c1102d45173b2fa8dfb4698e81193b7dc601f /src
parent9acb96422d3c60834440fec5be20267ae8958b7c (diff)
downloadvyos-1x-faab3c22e66b7eb34485c71edbf92cb00e74be26.tar.gz
vyos-1x-faab3c22e66b7eb34485c71edbf92cb00e74be26.zip
Revert "validators: T6739: fix ipaddrcheck argument quoting"
Diffstat (limited to 'src')
-rwxr-xr-xsrc/validators/interface-address2
-rwxr-xr-xsrc/validators/ip-address4
-rwxr-xr-xsrc/validators/ip-cidr4
-rwxr-xr-xsrc/validators/ip-host4
-rwxr-xr-xsrc/validators/ip-prefix4
-rwxr-xr-xsrc/validators/ipv44
-rwxr-xr-xsrc/validators/ipv4-address4
-rwxr-xr-xsrc/validators/ipv4-host4
-rwxr-xr-xsrc/validators/ipv4-multicast4
-rwxr-xr-xsrc/validators/ipv4-prefix4
-rwxr-xr-xsrc/validators/ipv4-range4
-rwxr-xr-xsrc/validators/ipv4-range-mask2
-rwxr-xr-xsrc/validators/ipv64
-rwxr-xr-xsrc/validators/ipv6-address4
-rwxr-xr-xsrc/validators/ipv6-host4
-rwxr-xr-xsrc/validators/ipv6-multicast4
-rwxr-xr-xsrc/validators/ipv6-prefix4
-rwxr-xr-xsrc/validators/ipv6-srv6-segments2
18 files changed, 33 insertions, 33 deletions
diff --git a/src/validators/interface-address b/src/validators/interface-address
index 186ffa23c..4c203956b 100755
--- a/src/validators/interface-address
+++ b/src/validators/interface-address
@@ -1,3 +1,3 @@
#!/bin/sh
-ipaddrcheck --is-ipv4-host "$1" || ipaddrcheck --is-ipv6-host "$1"
+ipaddrcheck --is-ipv4-host $1 || ipaddrcheck --is-ipv6-host $1
diff --git a/src/validators/ip-address b/src/validators/ip-address
index 351f728a6..11d6df09e 100755
--- a/src/validators/ip-address
+++ b/src/validators/ip-address
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-any-single "$1"
+ipaddrcheck --is-any-single $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IP address"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ip-cidr b/src/validators/ip-cidr
index 8a01e7ad9..60d2ac295 100755
--- a/src/validators/ip-cidr
+++ b/src/validators/ip-cidr
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-any-cidr "$1"
+ipaddrcheck --is-any-cidr $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IP CIDR"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ip-host b/src/validators/ip-host
index 7c5ad2612..77c578fa2 100755
--- a/src/validators/ip-host
+++ b/src/validators/ip-host
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-any-host "$1"
+ipaddrcheck --is-any-host $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IP host"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ip-prefix b/src/validators/ip-prefix
index 25204ace5..e5a64fea8 100755
--- a/src/validators/ip-prefix
+++ b/src/validators/ip-prefix
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-any-net "$1"
+ipaddrcheck --is-any-net $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IP prefix"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ipv4 b/src/validators/ipv4
index 11f854cf1..8676d5800 100755
--- a/src/validators/ipv4
+++ b/src/validators/ipv4
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-ipv4 "$1"
+ipaddrcheck --is-ipv4 $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not IPv4"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ipv4-address b/src/validators/ipv4-address
index 1cfd961ba..058db088b 100755
--- a/src/validators/ipv4-address
+++ b/src/validators/ipv4-address
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-ipv4-single "$1"
+ipaddrcheck --is-ipv4-single $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IPv4 address"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ipv4-host b/src/validators/ipv4-host
index eb8faaa2a..74b8c36a7 100755
--- a/src/validators/ipv4-host
+++ b/src/validators/ipv4-host
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-ipv4-host "$1"
+ipaddrcheck --is-ipv4-host $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IPv4 host"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ipv4-multicast b/src/validators/ipv4-multicast
index cf871bd59..3f28c51db 100755
--- a/src/validators/ipv4-multicast
+++ b/src/validators/ipv4-multicast
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-ipv4-multicast "$1" && ipaddrcheck --is-ipv4-single "$1"
+ipaddrcheck --is-ipv4-multicast $1 && ipaddrcheck --is-ipv4-single $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IPv4 multicast address"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ipv4-prefix b/src/validators/ipv4-prefix
index f8d46c69c..7e1e0e8dd 100755
--- a/src/validators/ipv4-prefix
+++ b/src/validators/ipv4-prefix
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-ipv4-net "$1"
+ipaddrcheck --is-ipv4-net $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IPv4 prefix"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ipv4-range b/src/validators/ipv4-range
index 56de64e66..6492bfc52 100755
--- a/src/validators/ipv4-range
+++ b/src/validators/ipv4-range
@@ -18,12 +18,12 @@ if [[ "$1" =~ "-" ]]; then
# hyphen as delimiter
readarray -d - -t strarr <<< $1
- ipaddrcheck --is-ipv4-single "${strarr[0]}"
+ ipaddrcheck --is-ipv4-single ${strarr[0]}
if [ $? -gt 0 ]; then
error_exit $1
fi
- ipaddrcheck --is-ipv4-single "${strarr[1]}"
+ ipaddrcheck --is-ipv4-single ${strarr[1]}
if [ $? -gt 0 ]; then
error_exit $1
fi
diff --git a/src/validators/ipv4-range-mask b/src/validators/ipv4-range-mask
index 8fa4abe30..9373328ff 100755
--- a/src/validators/ipv4-range-mask
+++ b/src/validators/ipv4-range-mask
@@ -17,7 +17,7 @@ do
done
if [[ "${range}" =~ "-" ]]&&[[ ! -z ${mask} ]]; then
- ipaddrcheck --range-prefix-length "${mask}" --is-ipv4-range "${range}"
+ ipaddrcheck --range-prefix-length ${mask} --is-ipv4-range ${range}
if [ $? -gt 0 ]; then
error_exit ${range} ${mask}
fi
diff --git a/src/validators/ipv6 b/src/validators/ipv6
index 57696add7..4ae130eb5 100755
--- a/src/validators/ipv6
+++ b/src/validators/ipv6
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-ipv6 "$1"
+ipaddrcheck --is-ipv6 $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not IPv6"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ipv6-address b/src/validators/ipv6-address
index 460639090..1fca77668 100755
--- a/src/validators/ipv6-address
+++ b/src/validators/ipv6-address
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-ipv6-single "$1"
+ipaddrcheck --is-ipv6-single $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IPv6 address"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ipv6-host b/src/validators/ipv6-host
index 1eb4d8e35..7085809a9 100755
--- a/src/validators/ipv6-host
+++ b/src/validators/ipv6-host
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-ipv6-host "$1"
+ipaddrcheck --is-ipv6-host $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IPv6 host"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ipv6-multicast b/src/validators/ipv6-multicast
index 746ff7edf..5aa7d734a 100755
--- a/src/validators/ipv6-multicast
+++ b/src/validators/ipv6-multicast
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-ipv6-multicast "$1" && ipaddrcheck --is-ipv6-single "$1"
+ipaddrcheck --is-ipv6-multicast $1 && ipaddrcheck --is-ipv6-single $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IPv6 multicast address"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ipv6-prefix b/src/validators/ipv6-prefix
index 1bb9b42fe..890dda723 100755
--- a/src/validators/ipv6-prefix
+++ b/src/validators/ipv6-prefix
@@ -1,10 +1,10 @@
#!/bin/sh
-ipaddrcheck --is-ipv6-net "$1"
+ipaddrcheck --is-ipv6-net $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IPv6 prefix"
exit 1
fi
-exit 0
+exit 0 \ No newline at end of file
diff --git a/src/validators/ipv6-srv6-segments b/src/validators/ipv6-srv6-segments
index b2199f833..e72a4f90f 100755
--- a/src/validators/ipv6-srv6-segments
+++ b/src/validators/ipv6-srv6-segments
@@ -3,7 +3,7 @@ segments="$1"
export IFS="/"
for ipv6addr in $segments; do
- ipaddrcheck --is-ipv6-single "$ipv6addr"
+ ipaddrcheck --is-ipv6-single $ipv6addr
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid IPv6 address"
exit 1