dhcpcd-discuss

Re: Does old_fqdn take on the value of new_dhcp6_fqdn?

Roy Marples

Thu Aug 20 17:03:58 2015

Hi Paul

On 16/08/2015 21:30, Walrath, Paul wrote:
> I guess a final thought on this would be, when dhcpcd sets a device's
> host name, it doesn't remember it - perhaps it should.  If it ever
> decides it might need to set the host name again, given newly
> received information from a DHCPv4 or a DHCPv6 server, it can check
> the current host name against the one that it previously set and
> decide if it should our should not update the host name.  If the
> current host name does not match the host name that dhcpcd previously
> set, then some other process must have set the host name and dhcpcd
> should leave it alone, that is, unless the current host name matches
> one of the host names considered an initial host name like "(none)"
> or "localhost".
> 
> In the case I detailed earlier, if dhcpcd remembered that it set
> "web6.fqdn6.walrath.name" the last time it set the host name and it
> sees the DHCPv4 server providing "webhost4" and
> "webdomain4.walrath.name" it will see that the current host name
> matches what it set previously and update the host name to
> "webhsot4.webdomain4.walrath.name".

So what happens if the DHCPv4 message wants to set the hostname to
webhost4.webdomain4.walrath.name and the DHCPv6 message wants to set the
hostname to webhost6.webdomain6.walrath.name?

If dhcpcd remembers the hostname it set and tests against it then the
hostname will flipflop between the two which would be bad.

I would expect a dual stack DHCP server to set hostname in both DHCPv4
and DHCPv6 messages.
Your scenario only becomes a problem if server or client flips to DHCPv4
or DHCPv6 only AND the server changes hostname. While possible, I woud
think and hope this highly unlikely.

Roy

References:
Does old_fqdn take on the value of new_dhcp6_fqdn?Walrath, Paul
RE: Does old_fqdn take on the value of new_dhcp6_fqdn?Roy Marples
Re: Does old_fqdn take on the value of new_dhcp6_fqdn?Roy Marples
Re: Does old_fqdn take on the value of new_dhcp6_fqdn?Roy Marples
RE: Does old_fqdn take on the value of new_dhcp6_fqdn?Walrath, Paul
RE: Does old_fqdn take on the value of new_dhcp6_fqdn?Roy Marples
RE: Does old_fqdn take on the value of new_dhcp6_fqdn?Walrath, Paul
Archive administrator: postmaster@marples.name