udhcpd: support per-client hostnames in static leases

function                                             old     new   delta
read_staticlease                                     222     299     +77
add_server_options                                    92     154     +62
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 139/0)             Total: 139 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2019-05-16 11:18:49 +02:00
parent 9bf6780c28
commit a840884531
3 changed files with 71 additions and 16 deletions

View File

@@ -44,7 +44,7 @@ interface eth0
#notify_file # default: no script
#notify_file dumpleases # useful for debugging
# The following are bootp specific options
# The following are BOOTP specific options
# next server to use in bootstrap
#siaddr 192.168.0.22 # default: 0.0.0.0 (none)
# tftp server name
@@ -52,9 +52,14 @@ interface eth0
# tftp file to download (e.g. kernel image)
#boot_file /var/nfs_root # default: none
# NOTE: "boot_file FILE" and "opt bootfile FILE" are conceptually the same,
# but "boot_file" goes into BOOTP-defined fixed-size field in the packet,
# whereas "opt bootfile" goes into DHCP option 0x43.
# Same for "sname HOST" and "opt tftp HOST".
# Static leases map
#static_lease 00:60:08:11:CE:4E 192.168.0.54
#static_lease 00:60:08:11:CE:3E 192.168.0.44
#static_lease 00:60:08:11:CE:3E 192.168.0.44 optional_hostname
# The remainder of options are DHCP options and can be specified with the
# keyword 'opt' or 'option'. If an option can take multiple items, such