From 1da1701ce75d0685a0587ce6f0365a0be447c662 Mon Sep 17 00:00:00 2001 From: Viacheslav Date: Tue, 28 Dec 2021 15:42:48 +0000 Subject: 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 --- src/validators/ipv6-link-local | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 src/validators/ipv6-link-local (limited to 'src/validators') 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) -- cgit v1.2.3