summaryrefslogtreecommitdiff
path: root/interface-definitions/include/constraint/dhcp-client-string-option.xml.i
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-11-19 21:43:15 +0100
committerChristian Breunig <christian@breunig.cc>2023-11-19 21:43:15 +0100
commitbed1cd01904ef89b5d31bd47de0f230214900f16 (patch)
tree46744c0454a3656cfa57dadeed8d19bf556e94f5 /interface-definitions/include/constraint/dhcp-client-string-option.xml.i
parent7721e43e8b684e9b46c7294e961f57f9d5f1baf3 (diff)
downloadvyos-1x-bed1cd01904ef89b5d31bd47de0f230214900f16.tar.gz
vyos-1x-bed1cd01904ef89b5d31bd47de0f230214900f16.zip
dhcp-client: T5760: add constraints for dhclient string options
The string data type specifies either an NVT ASCII string enclosed in double quotes, or a series of octets specified in hexadecimal, separated by colons. For example: set interfaces ethernet eth0 dhcp-options client-id CLIENT-FOO or set interfaces ethernet eth0 dhcp-options client-id 43:4c:49:45:54:2d:46:4f:4f As of now there was no input validation performed.
Diffstat (limited to 'interface-definitions/include/constraint/dhcp-client-string-option.xml.i')
-rw-r--r--interface-definitions/include/constraint/dhcp-client-string-option.xml.i4
1 files changed, 4 insertions, 0 deletions
diff --git a/interface-definitions/include/constraint/dhcp-client-string-option.xml.i b/interface-definitions/include/constraint/dhcp-client-string-option.xml.i
new file mode 100644
index 000000000..76e0e5466
--- /dev/null
+++ b/interface-definitions/include/constraint/dhcp-client-string-option.xml.i
@@ -0,0 +1,4 @@
+<!-- include start from include/constraint/dhcp-client-string-option.xml.i -->
+<regex>[-_a-zA-Z0-9\s]+</regex>
+<regex>([a-fA-F0-9][a-fA-F0-9]:){2,}[a-fA-F0-9][a-fA-F0-9]</regex>
+<!-- include end -->