summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2023-12-21 03:18:45 -0600
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-12-21 09:59:50 +0000
commit4a890dba1c4b06f177de24bbb54f55b2428ad2f1 (patch)
tree060acfc65b3a4bdd6c3f2c04fb8837ca647fd6e4
parenta5a5658acde0ebb8b6866f6f0feaadaab938bd0a (diff)
downloadvyos-1x-4a890dba1c4b06f177de24bbb54f55b2428ad2f1.tar.gz
vyos-1x-4a890dba1c4b06f177de24bbb54f55b2428ad2f1.zip
dhcp: T5846: Ensure DUID regex range is bound
The DUID regex was missing a lower bound, which could cause it not to match when it should. We have to specify the lower bound explicitly as 0 to keep the regex behavior similar to that in Python (in Python, omitting the lower bound is equivalent to specifying 0). (cherry picked from commit 551f06218755076cde588c848c01ce5ca1bf5e6b)
-rw-r--r--interface-definitions/include/interface/duid.xml.i2
1 files changed, 1 insertions, 1 deletions
diff --git a/interface-definitions/include/interface/duid.xml.i b/interface-definitions/include/interface/duid.xml.i
index 4f8988dfa..8d808696e 100644
--- a/interface-definitions/include/interface/duid.xml.i
+++ b/interface-definitions/include/interface/duid.xml.i
@@ -7,7 +7,7 @@
<description>DHCP unique identifier</description>
</valueHelp>
<constraint>
- <regex>([0-9A-Fa-f]{2}:){,127}([0-9A-Fa-f]{2})</regex>
+ <regex>([0-9A-Fa-f]{2}:){0,127}([0-9A-Fa-f]{2})</regex>
</constraint>
<constraintErrorMessage>Invalid DUID, must be in the format h[[:h]...]</constraintErrorMessage>
</properties>