From 2e5ea7a8304ed6ce504b3928e3b2f52574a61397 Mon Sep 17 00:00:00 2001 From: Ruben Herold Date: Mon, 31 Aug 2026 12:49:24 +0200 Subject: dhcp-server: T9267: add client-class matching on hostname/vendor-class-id Client classes could previously only match on relay agent information (Option 82). Add matching on the client-sent hostname (Option 12) and vendor class identifier (Option 60), each with an exact-value or substring form, so clients sharing a subnet can be told apart by e.g. device model without splitting the subnet into per-model pools. Also let a client-class deliver its own options (reusing the existing subnet/range option syntax), so a match can directly hand out a model-specific value such as a provisioning URL, independent of which pool the client's lease is drawn from. --- .../include/dhcp/dhcp-server-common-config.xml.i | 129 +++++++++++++++++++++ 1 file changed, 129 insertions(+) (limited to 'interface-definitions/include') diff --git a/interface-definitions/include/dhcp/dhcp-server-common-config.xml.i b/interface-definitions/include/dhcp/dhcp-server-common-config.xml.i index 4fc5a4b5b..60ba1f952 100644 --- a/interface-definitions/include/dhcp/dhcp-server-common-config.xml.i +++ b/interface-definitions/include/dhcp/dhcp-server-common-config.xml.i @@ -42,6 +42,135 @@ + + + Match DHCP Option 12 (hostname) + + + + + Filters on the exact contents of the option + + hex + Values that start with 0x are interpreted as raw hex. This must only be hexadecimal characters e.g. 0x1234567890ABCDEF + + + txt + Any other text string is interpreted as ASCII text + + + + + + Filters on part of the option contents + + + + + Byte offset from the start of the option value (default: 0) + + u32:0-255 + Byte offset + + + + + + + + + Number of bytes to compare (default: length of value) + + u32:1-255 + Byte length + + + + + + + + + Filters on part of the option contents + + hex + Values that start with 0x are interpreted as raw hex. This must only be hexadecimal characters e.g. 0x1234567890ABCDEF + + + txt + Any other text string is interpreted as ASCII text + + + + + + + + + + Match DHCP Option 60 (vendor class identifier) + + + + + Filters on the exact contents of the option + + hex + Values that start with 0x are interpreted as raw hex. This must only be hexadecimal characters e.g. 0x1234567890ABCDEF + + + txt + Any other text string is interpreted as ASCII text + + + + + + Filters on part of the option contents + + + + + Byte offset from the start of the option value (default: 0) + + u32:0-255 + Byte offset + + + + + + + + + Number of bytes to compare (default: length of value) + + u32:1-255 + Byte length + + + + + + + + + Filters on part of the option contents + + hex + Values that start with 0x are interpreted as raw hex. This must only be hexadecimal characters e.g. 0x1234567890ABCDEF + + + txt + Any other text string is interpreted as ASCII text + + + + + + + + #include #include -- cgit v1.2.3