diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-02-11 23:46:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-11 23:46:27 +0000 |
commit | bf595a899ae192f24793374978f44d31fa43d195 (patch) | |
tree | 840bdfd3e7d2d9e64c27e6893c9bffeaf5dbd593 /src | |
parent | 1d0c97f7b13ef1e4c857d64dc968c5f284e5d1ad (diff) | |
parent | b84f7de453f3951945298d95a8a27345ba7d28c3 (diff) | |
download | vyos-1x-bf595a899ae192f24793374978f44d31fa43d195.tar.gz vyos-1x-bf595a899ae192f24793374978f44d31fa43d195.zip |
Merge pull request #2980 from c-po/srv6-T5849
srv6: T5849: add segment support to "protocols static route6"
Diffstat (limited to 'src')
-rwxr-xr-x | src/validators/ipv6-srv6-segments | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/validators/ipv6-srv6-segments b/src/validators/ipv6-srv6-segments new file mode 100755 index 000000000..e72a4f90f --- /dev/null +++ b/src/validators/ipv6-srv6-segments @@ -0,0 +1,13 @@ +#!/bin/sh +segments="$1" +export IFS="/" + +for ipv6addr in $segments; do + ipaddrcheck --is-ipv6-single $ipv6addr + if [ $? -gt 0 ]; then + echo "Error: $1 is not a valid IPv6 address" + exit 1 + fi +done +exit 0 + |