dhcpcd-discuss

Possible bugs related to IPv6-SLAAC (DNSSL) and stateless DHCPv6 (INFORM6)

feedback

Wed Jun 19 18:44:03 2019

Hello,

first of all, sorry, this email got a little longer than I thought.

I think I have found two _separate_ bugs within the latest dhcpcd
versions 7.2.2 and 6.11.7 when I tested the following setup:


Server setup:
IPv6 RA(+RDNSS+DNSSL) with M=0,O=1,A=1 and stateless DHCPv6.
Software is radvd-2.17 and isc-dhcpd-4.3.1.


Client setup (all tests with same dhcpcd.conf):

dhcpcd.conf:
duid
persistent
option rapid_commit
option interface_mtu
option subnet_mask, broadcast_address
option classless_static_routes
option domain_name_servers, domain_name, domain_search, host_name
option posix_timezone, tzdb_timezone, ntp_servers
require subnet_mask
require dhcp_server_identifier
slaac private
timeout 40
hostname
nolink
noup
noipv4ll
debug
background
ipv6only
ipv6ra_autoconf

Startup:
dhcpcd -B eth0


Detailed dhcpcd version info:

dhcpcd 7.2.2
Copyright (c) 2006-2019 Roy Marples
Compiled in features: INET ARP ARPing IPv4LL INET6 DHCPv6 AUTH

dhcpcd 6.11.7
Copyright (c) 2006-2016 Roy Marples
Compiled in features: INET IPv4LL INET6 DHCPv6 AUTH



##
## BUG 1
##

Missing DNS search domains with dhcpcd-6.11.7.

radvdump shows:
[...]
        DNSSL radvd1.org radvd2.org radvd3.org
        {
                AdvDNSSLLifetime 600;
        }; # End of DNSSL definition
[...]
dhcpd config:
[...]
        option dhcp6.domain-search "from-dhcpd.org";
[...]

/etc/resolv.conf:
# Generated by dhcpcd from eth0.dhcp6, eth0.ra
# /etc/resolv.conf.head can replace this line
search from-dhcpd.org
nameserver fd00:1234::1
# /etc/resolv.conf.tail can replace this line

If I set e.g. only a single domain via RA then I see both:

# Generated by dhcpcd from eth0.dhcp6, eth0.ra
# /etc/resolv.conf.head can replace this line
search from-dhcpd.org radvd1.org
nameserver fd00:1234::1
# /etc/resolv.conf.tail can replace this line

I haven't tested multiple RDNSS entries, maybe there is a similar problem.

Debug log for 6.11.7 (some parts X'd):
dhcpcd-6.11.7 starting
all: IPv6 kernel autoconf disabled
eth0: if_disable_autolinklocal: Operation not supported
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
DUID 00:01:00:01:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
eth0: IAID XX:XX:XX:XX
eth0: delaying IPv6 router solicitation for 0.9 seconds
eth0: soliciting an IPv6 router
eth0: sending Router Solicitation
eth0: Router Advertisement from fe80::XXX:XXXX:XXXX:XXXX
eth0: adding address fd00:1234::1e04:6c27:8d9:d319/64
eth0: pltime 1800 seconds, vltime 10800 seconds
eth0: adding route to fd00:1234::/64
eth0: adding default route via fe80::XXX:XXXX:XXXX:XXXX
eth0: waiting for Router Advertisement DAD to complete
eth0: requesting DHCPv6 information
eth0: delaying INFORM6 (xid 0x25abdb), next in 0.3 seconds
eth0: broadcasting INFORM6 (xid 0x25abdb), next in 0.9 seconds
eth0: REPLY6 received from fe80::XXX:XXXX:XXXX:XXXX
eth0: refresh in 3600 seconds
eth0: writing lease `/var/db/dhcpcd-eth0.lease6'
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' INFORM6
eth0: Router Advertisement DAD completed
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' ROUTERADVERT

Same setup with dhcpcd-7.2.2 and I see all 4 dummy domains:

/etc/resolv.conf:
# Generated by dhcpcd from eth0.dhcp6, eth0.ra
# /etc/resolv.conf.head can replace this line
search from-dhcpd.org radvd1.org radvd2.org radvd3.org
nameserver fd00:1234::1
# /etc/resolv.conf.tail can replace this line



##
## BUG 2
##

Stateless DHCPv6 seems to be broken in dhcpcd-7.2.2 as it never sends
any INFORM6 message but always wants to request an IPv6 address.

This results of course in two ULA addresses:

ip -6 addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 fd00:1234::350/128 scope global dynamic
       valid_lft 93sec preferred_lft 48sec
    inet6 fd00:1234::470f:6950:89cc:c9ac/64 scope global dynamic
       valid_lft 10784sec preferred_lft 1784sec
    inet6 fe80::XXX:XXX:XXXX:XXXX/64 scope link
       valid_lft forever preferred_lft forever

Debug log:
dhcpcd-7.2.2 starting
eth0: if_disable_autolinklocal: Operation not supported
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
DUID 00:01:00:01:c7:95:ac:c7:00:0b:02:53:81:7a
eth0: IAID 02:53:81:7a
eth0: delaying IPv6 router solicitation for 0.6 seconds
eth0: soliciting an IPv6 router
eth0: sending Router Solicitation
eth0: Router Advertisement from fe80::a00:27ff:fe12:2f84
eth0: adding address fd00:1234::470f:6950:89cc:c9ac/64
eth0: pltime 1800 seconds, vltime 10800 seconds
eth0: adding route to fd00:1234::/64
eth0: adding default route via fe80::a00:27ff:fe12:2f84
eth0: waiting for Router Advertisement DAD to complete
eth0: reading lease `/var/db/dhcpcd/eth0.lease6'
eth0: soliciting a DHCPv6 lease
eth0: delaying SOLICIT6 (xid 0x138a20), next in 0.2 seconds
eth0: broadcasting SOLICIT6 (xid 0x138a20), next in 1.1 seconds
eth0: REPLY6 received from fe80::a00:27ff:fe12:2f84
eth0: adding address fd00:1234::350/128
eth0: pltime 75 seconds, vltime 120 seconds
eth0: renew in 37, rebind in 60, expire in 120 seconds
eth0: writing lease `/var/db/dhcpcd/eth0.lease6'
eth0: waiting for DHCPv6 DAD to complete
eth0: Router Advertisement DAD completed
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' ROUTERADVERT
eth0: sending NA for fd00:1234::470f:6950:89cc:c9ac/64
eth0: DHCPv6 DAD completed
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' BOUND6
eth0: sending NA for fd00:1234::350/128
eth0: sending NA for fd00:1234::470f:6950:89cc:c9ac/64
eth0: sending NA for fd00:1234::350/128
eth0: sending NA for fd00:1234::470f:6950:89cc:c9ac/64
eth0: sending NA for fd00:1234::350/128
eth0: fe80::a00:27ff:fe12:2f84 not a router (fe80::a00:27ff:fe12:2f84)
eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' ROUTERADVERT


Kind regards,
Andreas

Follow-Ups:
Re: Possible bugs related to IPv6-SLAAC (DNSSL) and stateless DHCPv6 (INFORM6)Roy Marples
Archive administrator: postmaster@marples.name