Page MenuHomeVyOS Platform

DHCPv6 not updating nameservers and search domains since replacing isc-dhcp-client with WIDE dhcp6c
Open, HighPublicBUG

Description

Before the switch to WIDE dhcp6c , adding and deleting nameservers and search domains from the lease was done by isc-dhcp-client dhclient-script. This has custom hooks (make_resolv_conf and a post script) that do the necessary updating of nameservers via vyos-hostsd.
Since switching to WIDE dhcp6c for T421 these scripts aren't ran any more. WIDE dhcp6c does support running scripts, but after comparing the two, they aren't compatible, so it isn't a simple case of running the existing isc-dhcp scripts with wide.

most notably from 'man dhcp6c':

Configuration Script
When receives a reply message, it will invoke a supplementary configuration script specified in the dhcp6c.conf5 file. The daemon will provide the script with configuration parameters as environment variables, which include:

REASON
    The reason why the script is invoked. As of this writing, the value is always "NBI" and thus meaningless. 
new_domain_name_servers
    A list of available DNS servers, each of which is an IPv6 numeric address and is separated by a white space character. 
new_domain_name
    A list of DNS names, which provides DNS name search path. 
new_ntp_servers
    A list of available NTP servers, each of which is an IPv6 numeric address and is separated by a white space character. 
new_sip_servers
    A list of available SIP server addresses, each of which is an IPv6 numeric address and is separated by a white space character. 
new_sip_name
    A list of SIP server domain names. 
new_nis_servers
    A list of available NIS server addresses, each of which is an IPv6 numeric address and is separated by a white space character. 
new_nis_name
    A list of NIS domain names. 
new_nisp_servers
    A list of available NIS+ server addresses, each of which is an IPv6 numeric address and is separated by a white space character. 
new_nisp_name
    A list of NIS+ domain names. 
new_bcmcs_servers
    A list of available BCMCS server addresses, each of which is an IPv6 numeric address and is separated by a white space character. 
new_bcmcs_name
    A list of BCMCS server domain names.

So the critical differences are:

  • REASON is never set to the real reason (isc-dhcp does set it)
  • new_domain_name_servers is used for v6, whereas isc-dhcp uses it for v4 and has a separate new_dhcp6_name_servers variable for v6
  • new_domain_name is the equivalent of isc-dhcp new_dhcp6_domain_search

So to fix this with wide-dhcp6, we'd need to make a completely new script that does the same things the existing pre/post hooks for dhclient-script do, but suitable for wide.

(if anyone wants to start working on this, note there is a pending vyos-1x PR for the whole vyos-hostsd/dhclient hooks so please wait until it's merged)

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)