Re: 30-hostname Behavior When Switching Network Interfaces
Roy Marples
Fri Oct 30 13:30:35 2015
Hi Paul
Sorry for the late reply
On 2015-10-28 22:06, Walrath, Paul wrote:
When 30-hostname runs, are old_host_name, old_domain_name, and
old_fqdn interface specific?
Yes. They are specific to the interface which captured the information.
Generally, if >1 interface provides the same information that is a
singleton (ip address, hostname, etc) then dhcpcd prefers the interface
with the lowest metric.
However I special case hostname because if that changes whilst say X is
running or Kerberos is being used then Bad Things Happen.
The reason that I ask is that, if my device is connected to a network
on one interface (e.g. eth0) and it receives the host name (Option 12)
from a DHCPv4 server on that network, then I disconnect that
connection and connect a second network interface on the device (e.g.
wlan0) to a different network with a DHCPv4 server that is providing a
different host name, will 30-hostname update the device's host name?
It looks as though the current host name won't match the new network
interface's old_host_name (if old_host_name is interface specific) and
so an update won't occur.
Right, with the current design the hostname won't change.
With the patch you posted here:
http://roy.marples.name/projects/dhcpcd/tktview?name=de4a467525
dhcpcd will change the hostname back to localhost when eth0 goes down
which will allow another interface to set it when it comes up.
Roy
Archive administrator: postmaster@marples.name