diff options
author | Christian Breunig <christian@breunig.cc> | 2024-05-26 10:06:02 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-05-26 10:27:46 +0200 |
commit | ccd564c2328a086b326957fdde8b07ca560bd6b2 (patch) | |
tree | cd4c9f5546473a6868ecffa8fbee57606381c602 /interface-definitions/service_dhcpv6-server.xml.in | |
parent | b6c343c363bf471fc78bd8dec885c88f1dd90cb5 (diff) | |
download | vyos-1x-ccd564c2328a086b326957fdde8b07ca560bd6b2.tar.gz vyos-1x-ccd564c2328a086b326957fdde8b07ca560bd6b2.zip |
dhcpv6-server: T3493: add proper validation for prefix-delegation start/stop address
ISC DHCP server expects a string: "prefix6 2001:db8:290:: 2001:db8:29f:: /64;"
where the IPv6 prefix/range must be :: terminaated with a delegated prefix
length at the end.
This commit changes the validator that the IPv6 address defined on the CLI must
always end with ::. In addition a verify() step is added to check that the
stop address is greater than start address.
Diffstat (limited to 'interface-definitions/service_dhcpv6-server.xml.in')
-rw-r--r-- | interface-definitions/service_dhcpv6-server.xml.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/interface-definitions/service_dhcpv6-server.xml.in b/interface-definitions/service_dhcpv6-server.xml.in index a64da83ae..effba3884 100644 --- a/interface-definitions/service_dhcpv6-server.xml.in +++ b/interface-definitions/service_dhcpv6-server.xml.in @@ -229,7 +229,8 @@ <description>IPv6 address used in prefix delegation</description> </valueHelp> <constraint> - <validator name="ipv6-address"/> + <!-- IPv6 address used MUST end with :: --> + <regex>([a-fA-F0-9]{1,4}:)+:</regex> </constraint> </properties> <children> @@ -254,7 +255,8 @@ <description>IPv6 address used in prefix delegation</description> </valueHelp> <constraint> - <validator name="ipv6-address"/> + <!-- IPv6 address used MUST end with :: --> + <regex>([a-fA-F0-9]{1,4}:)+:</regex> </constraint> </properties> </leafNode> |