Re: Unable to acquire router solicitation on ppp link after update from 9.0.2 to 9.1.2
Daniel Albers
Tue Jun 23 21:31:50 2020
> > According to tcpdump no router solicitations are sent on the
> > interface,
> > despite dhcpcd printing "soliciting an IPv6 router" and strace
> > showing
> > correspondiing sendmsg() calls. I didn't have more time yet to dig
> > deeper unfortunately.
>
> Soliciting an IPv6 router has nothing to do with prefix delegation.
Right, that was a bit misworded. Solicits are sent often, so it was easy to just look for those. No other packets from dhcpcd
appear on the interface either, though.
> Could you add the word "debug" on a line by itself at the top please?
> logfile /var/log/dhcpcd.log
> may also help
>
> And if you could post logs of dhcpcd-9.0.2 working and dhcpcd-9.1.2
> not working
> that would be awesome :)
I bisected it down to "c1e48321 Rename ifp->family -> ifp->hwtype so
it's less confusing".
Stepping through the code I noticed that ifp->index is set to 0 (match
all) for this interface. The correct interface number would be 8.
Looking at the diff I guess the cleanup of the SIOCGIFINDEX ioctl is
causing this:
- else {
- /* This is a huge bug in getifaddrs(3) as there
- * is no reason why this can't be returned in
- * ifa_addr. */
- memset(&ifr, 0, sizeof(ifr));
- strlcpy(ifr.ifr_name, ifa->ifa_name,
- sizeof(ifr.ifr_name));
- if (ioctl(ctx->pf_inet_fd, SIOCGIFHWADDR, &ifr)
== -1)
- logerr("%s: SIOCGIFHWADDR", ifa-
>ifa_name);
- ifp->family = ifr.ifr_hwaddr.sa_family;
- if (ioctl(ctx->pf_inet_fd, SIOCGIFINDEX, &ifr)
== -1)
- logerr("%s: SIOCGIFINDEX", ifa-
>ifa_name);
- ifp->index = (unsigned int)ifr.ifr_ifindex;
- }
The log output has an additional "ext0: if_disable_autolinklocal: No
such device". ext0 is the PPP interface:
dhcpcd-9.0.2-2-g3aab7bf5:
dhcpcd-9.0.2 starting
spawned privileged actioneer on PID 28328
spawned network proxy on PID 28329
chrooting to `/var/lib/dhcpcd'
DUID 00:01:00:01:26:84:ec:b8:b8:27:eb:96:ab:57
eth0: IAID eb:96:ab:57
eth1: IAID 2e:e7:32:6a
vlan7: IAID ff:00:00:07
ext0: IAID 65:78:74:30
ext0: IA type 25 IAID 00:00:00:01
ext0: delaying IPv6 router solicitation for 0.0 seconds
ext0: reading lease `/var/db/dhcpcd/ext0.lease6'
ext0: soliciting a DHCPv6 lease
ext0: delaying SOLICIT6 (xid 0x1c4ca9), next in 2.1 seconds
ext0: soliciting an IPv6 router
ext0: sending Router Solicitation
ext0: Router Advertisement from fe80::2a8a:1cff:fe64:4cad
…
dhcpcd-9.0.2-3-gc1e48321:
dhcpcd-9.0.2 starting
spawned privileged actioneer on PID 28599
spawned network proxy on PID 28600
chrooting to `/var/lib/dhcpcd'
lo: ignoring due to interface type and no config
ext0: if_disable_autolinklocal: No such device
DUID 00:01:00:01:26:84:ec:b8:b8:27:eb:96:ab:57
eth0: IAID eb:96:ab:57
eth1: IAID 2e:e7:32:6a
vlan7: IAID ff:00:00:07
ext0: IAID 65:78:74:30
ext0: IA type 25 IAID 00:00:00:01
ext0: delaying IPv6 router solicitation for 0.1 seconds
ext0: reading lease `/var/db/dhcpcd/ext0.lease6'
ext0: soliciting a DHCPv6 lease
ext0: delaying SOLICIT6 (xid 0xf89d14), next in 2.1 seconds
ext0: soliciting an IPv6 router
ext0: sending Router Solicitation
ext0: broadcasting SOLICIT6 (xid 0xf89d14), next in 1.0 seconds
So presumably the SIOCGIFHWADDR ioctl is still needed in Linux 5.4.45 /
glibc 2.31 to get the index of a PPP interface.
Cheers
Daniel
Archive administrator: postmaster@marples.name