diff options
author | Viacheslav <v.gletenko@vyos.io> | 2022-01-15 14:38:21 +0000 |
---|---|---|
committer | Viacheslav <v.gletenko@vyos.io> | 2022-01-15 14:38:21 +0000 |
commit | cb69b6e875c961b5a0d1be5a734bea1ec03a976d (patch) | |
tree | 93f794909ffd22c60caf6a23c6ece7056cd283ad /src/validators/ipv6-link-local | |
parent | b5b9685c37aa48a88bdd697e4c46e94d274a5d95 (diff) | |
download | vyos-1x-cb69b6e875c961b5a0d1be5a734bea1ec03a976d.tar.gz vyos-1x-cb69b6e875c961b5a0d1be5a734bea1ec03a976d.zip |
wireguard: T4183: Allow setting ipv6 link local addres for peer
Allow setting ipv6-link-local addresses as peer address for
wireguard interfaces
Add validator "ipv6-link-local"
Diffstat (limited to 'src/validators/ipv6-link-local')
-rwxr-xr-x | src/validators/ipv6-link-local | 12 |
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) |