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
>Organization:
>Environment:
System: NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/cobalt/compile/GENERIC
Architecture: mipsel
Machine: cobalt (but maybe affects all)
>Description:
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
tlp0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ec_capabilities=1<VLAN_MTU>
        ec_enabled=0
        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 10.0.0.150
tlp0: leased 10.0.0.150 for 600 seconds
tlp0: adding route to 10.0.0.0/8
tlp0: adding default route via 10.0.0.254
tlp0: Setting hostname: localhost
forked to background, child pid 681
# hostname
localhost
# 
---

>How-To-Repeat:
See above

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

---
Izumi Tsutsui



Home | Main Index | Thread Index | Old Index