NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/55011: dhcpcd(8) sets "localhost" as hostname

>Number:         55011
>Category:       bin
>Synopsis:       dhcpcd(8) sets "localhost" as hostname
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 24 08:20:00 +0000 2020
>Originator:     Izumi Tsutsui
>Release:        NetBSD 9.0
System: NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020
Architecture: mipsel
Machine: cobalt (but maybe affects all)
With the default installation settings
(no /etc/dhcpcd.conf and default /libexec/dhcpcd-hooks scripts),
dhcpcd(8) uses "loalhost" for hostname, while man page says
as the following:
     If the hostname is currently blank, (null) or
     localhost, or force_hostname is YES or TRUE or 1 then dhcpcd sets the
     hostname to the one supplied by the DHCP server.

# ifconfig tlp0
        address: 00:10:e0:00:09:46
        media: Ethernet 10baseT
        status: active
        inet6 fe80::210:e0ff:fe00:946%tlp0/64 flags 0x0 scopeid 0x1
# hostname

# dhcpcd 
DUID 00:01:00:01:25:e6:a0:56:00:10:e0:00:09:46
tlp0: IAID e0:00:09:46
tlp0: soliciting an IPv6 router
tlp0: rebinding lease of
tlp0: leased for 600 seconds
tlp0: adding route to
tlp0: adding default route via
tlp0: Setting hostname: localhost
forked to background, child pid 681
# hostname

See above

No idea.
Tweak /libexec/dhcp-hooks/30-hostname ?

Izumi Tsutsui

Home | Main Index | Thread Index | Old Index