Commit 2152722b authored by Felix Fietkau's avatar Felix Fietkau Committed by Jo-Philipp Wich
Browse files

netifd: add support for suppressing the DHCP request hostname by setting it to *



dnsmasq (and probably other DHCP servers as well) does not like to hand out
leases with duplicate host names.
Adding support for skipping the hostname makes it easier to deploy setups
where it is not guaranteed to be unique
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
(cherry picked from commit fd8ca8de)
parent c3337e8f
...@@ -46,6 +46,8 @@ proto_dhcp_setup() { ...@@ -46,6 +46,8 @@ proto_dhcp_setup() {
json_for_each_item proto_dhcp_add_sendopts sendopts dhcpopts json_for_each_item proto_dhcp_add_sendopts sendopts dhcpopts
[ -z "$hostname" ] && hostname="$(cat /proc/sys/kernel/hostname)" [ -z "$hostname" ] && hostname="$(cat /proc/sys/kernel/hostname)"
[ "$hostname" = "*" ] && hostname=
[ "$defaultreqopts" = 0 ] && defaultreqopts="-o" || defaultreqopts= [ "$defaultreqopts" = 0 ] && defaultreqopts="-o" || defaultreqopts=
[ "$broadcast" = 1 ] && broadcast="-B" || broadcast= [ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
[ "$release" = 1 ] && release="-R" || release= [ "$release" = 1 ] && release="-R" || release=
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment