Services: Kea DHCP: Kea DHCPv4 - add 'match-client-id' in subnet definitions, closes https://github.com/opnsense/core/issues/8183

This commit is contained in:
Ad Schellevis 2025-01-06 10:09:06 +01:00
parent f72e066e4d
commit 77a6b14ce6
3 changed files with 13 additions and 1 deletions

View File

@ -17,6 +17,13 @@
<type>textbox</type>
<help>List of pools, one per line in range or subnet format (e.g. 192.168.0.100 - 192.168.0.200 , 192.0.2.64/26</help>
</field>
<field>
<id>subnet4.match-client-id</id>
<label>Match client-id</label>
<type>checkbox</type>
<help>By default KEA uses client-identifiers in stead of MAC addresses to locate clients, disabling this option
changes back to matching on MAC address which is used by most dhcp implementations.</help>
</field>
<field>
<type>header</type>
<label>DHCP option data</label>

View File

@ -142,6 +142,7 @@ class KeaDhcpv4 extends BaseModel
'id' => $subnet_id++,
'subnet' => (string)$subnet->subnet,
'next-server' => (string)$subnet->next_server,
'match-client-id'=> !empty((string)$subnet->{'match-client-id'}),
'option-data' => [],
'pools' => [],
'reservations' => []

View File

@ -1,6 +1,6 @@
<model>
<mount>//OPNsense/Kea/dhcp4</mount>
<version>1.0.2</version>
<version>1.0.3</version>
<description>Kea DHCPv4 configuration</description>
<items>
<general>
@ -102,6 +102,10 @@
<Mask>/^([^\n"])*$/u</Mask>
</boot_file_name>
</option_data>
<match-client-id type="BooleanField">
<Default>1</Default>
<Required>Y</Required>
</match-client-id>
<pools type=".\KeaPoolsField">
</pools>
<description type="DescriptionField"/>