summaryrefslogtreecommitdiff
path: root/interface-definitions/include/interface
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-04-20 19:34:39 +0200
committerChristian Poessinger <christian@poessinger.com>2021-04-20 19:34:39 +0200
commitdd4c60c1c3423f02457bc1dcc25e36d03d537a5f (patch)
treea2be55feb5fc28046e4ca21bbcc85b826c14b3c5 /interface-definitions/include/interface
parentde358823331fffcedf433d66a065f2dae1052596 (diff)
downloadvyos-1x-dd4c60c1c3423f02457bc1dcc25e36d03d537a5f.tar.gz
vyos-1x-dd4c60c1c3423f02457bc1dcc25e36d03d537a5f.zip
interfaces: T3488: harden regex for supplied address string
The previously used regex allowed an address value of "dhcpfoo" which is invalid and will raise an OSError. Harden the regex that it explicitly must be dhcp or dhcpv6.
Diffstat (limited to 'interface-definitions/include/interface')
-rw-r--r--interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i2
1 files changed, 1 insertions, 1 deletions
diff --git a/interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i b/interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i
index b9dd59bea..123590c08 100644
--- a/interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i
+++ b/interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i
@@ -23,7 +23,7 @@
</valueHelp>
<constraint>
<validator name="ip-host"/>
- <regex>(dhcp|dhcpv6)</regex>
+ <regex>^(dhcp|dhcpv6)$</regex>
</constraint>
<multi/>
</properties>