sd-dhcp-server: Add Hostname= option to static leases
This adds a new `Hostname=` option to the [DHCPServerStaticLease] section in .network files, allowing an administrator to assign a specific hostname to a client receiving a static lease. We automatically select the correct DHCP option to use based on the format of the provided string: - Single DNS labels are sent as Option 12. - Names with multiple DNS labels are sent as Option 81 in wire format. Fixes: #39634
This commit is contained in:
@@ -16,10 +16,12 @@ DNS=9.9.9.9
|
||||
[DHCPServerStaticLease]
|
||||
MACAddress=12:34:56:78:9a:bc
|
||||
Address=10.1.1.2
|
||||
Hostname=testhost
|
||||
|
||||
[DHCPServerStaticLease]
|
||||
MACAddress=12:34:56:78:9a:bc
|
||||
Address=10.1.1.3
|
||||
Hostname=device.example.com
|
||||
|
||||
[DHCPServerStaticLease]
|
||||
Address=10.1.1.4
|
||||
|
||||
Reference in New Issue
Block a user