isc-dhcp: distinguish between hexstrings and strings
authorPhilip Prindeville <[email protected]>
Sat, 7 Jun 2025 20:38:26 +0000 (14:38 -0600)
committerPhilip Prindeville <[email protected]>
Fri, 15 Aug 2025 03:43:00 +0000 (21:43 -0600)
It's a minor difference and they're handled the same, but that
might change as we move to Kea.

Signed-off-by: Philip Prindeville <[email protected]>
net/isc-dhcp/files/dhcpd.init

index 9ea159f6eda19e19b82678d5dd93ba388da7818f..f67ed9f9b52a445009ea3b1045f97f3d93efef3d 100755 (executable)
@@ -110,7 +110,7 @@ typeof() {
 /^(true|false)$/               { print "bool\n"; next; }
 /^\d+$/                                { print "integer\n"; next; }
 /^"[^"]*"$/                    { print "string\n"; next; }
-/^[0-9a-fA-F]{2,2}(:[0-9a-fA-F]{2,2})*$/       { print "string\n"; next; }
+/^[0-9a-fA-F]{2,2}(:[0-9a-fA-F]{2,2})*$/       { print "hexstring\n"; next; }
                                { print "other\n"; next; }
 '
 }
@@ -190,7 +190,7 @@ append_dhcp_options() {
        for value in $values; do
                # detect type of $value and quote if necessary
                case $(typeof "$value") in
-               ip|bool|integer|string)
+               ip|bool|integer|string|hexstring)
                        ;;
                other)
                        value="\"$value\""