diff options
author | Viacheslav <v.gletenko@vyos.io> | 2021-12-28 15:42:48 +0000 |
---|---|---|
committer | Viacheslav <v.gletenko@vyos.io> | 2022-01-03 08:32:26 +0000 |
commit | 1da1701ce75d0685a0587ce6f0365a0be447c662 (patch) | |
tree | 66392d8abdff5dcbf85d6c71bf948203b5a795b7 /src/validators | |
parent | 5c5e283f8a964f5bbb3d838d1c0aabdee4e2032b (diff) | |
download | vyos-1x-1da1701ce75d0685a0587ce6f0365a0be447c662.tar.gz vyos-1x-1da1701ce75d0685a0587ce6f0365a0be447c662.zip |
listen-address: T4110: Ability to set IPv6 link-local addresses
Some services allows to set link-local IPv6 addresses as
listen-address. Allow it and add a validator 'ipv6-link-local'
and extend listen-address.xml.i to this validator
Diffstat (limited to 'src/validators')
-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) |