netifd: always send DHCPv4 hostname
udhcpc doesn't send a hostname by default. Use the system hostname if nothing else is specified, to always send a hostname. It syncs the behaviour to odhcpc, which always sends a hostname. Signed-off-by: Mathias Kresin <dev@kresin.me> Acked-by: Stijn Tintel <stijn@linux-ipv6.be> Acked-by: Hans Dedecker <dedeckeh@gmail.com>
This commit is contained in:
parent
93bd46b719
commit
abdf0dea3a
1 changed files with 1 additions and 0 deletions
|
@ -40,6 +40,7 @@ proto_dhcp_setup() {
|
|||
append dhcpopts "-x $opt"
|
||||
done
|
||||
|
||||
[ -z "$hostname" ] && hostname="$(cat /proc/sys/kernel/hostname)"
|
||||
[ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
|
||||
[ "$release" = 1 ] && release="-R" || release=
|
||||
[ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C"
|
||||
|
|
Loading…
Reference in a new issue