Re: dhcpcd on raspberry pi doesn't pick up an IPv6 address
Roy Marples
Fri Jan 24 14:23:38 2020
Hi James
On 22/01/2020 19:22, James Gross wrote:
Jan 22 19:18:04 [299]: eth0: delaying CONFIRM6 (xid 0x838b79), next in 1.0 seconds
Jan 22 19:18:05 [299]: eth0: broadcasting CONFIRM6 (xid 0x838b79), next in 1.1
seconds
Jan 22 19:18:05 [299]: eth0: REPLY6 received from fe80::be99:11ff:fe81:6408
Jan 22 19:18:05 [299]: eth0: elapsed time 0
Jan 22 19:18:05 [299]: eth0: adding address 2001:8b0:de0a:bb0e::5/128
Jan 22 19:18:05 [299]: eth0: pltime 86400 seconds, vltime 86400 seconds
Jan 22 19:18:05 [299]: eth0: renew in 43200, rebind in 69120, expire in 86400
seconds
Jan 22 19:18:05 [299]: eth0: writing lease `/var/lib/dhcpcd5/eth0.lease6'
Jan 22 19:18:05 [299]: eth0: waiting for DHCPv6 DAD to complete
Jan 22 19:18:05 [299]: eth0: adding default route via fe80::be99:11ff:fe81:6408
Jan 22 19:18:06 [299]: eth0: pid 0 deleted address 2001:8b0:de0a:bb0e::5/128
Jan 22 19:18:06 [299]: eth0: deleting default route via fe80::be99:11ff:fe81:6408
I don't know why the kernel is deleteing the address.
It should only do that when the address has expired - ie vltime hits zero. But
we can see it has a large vltime.
I've tested on 32-bit alpine linux and cannot replicate this issue at all ....
I'm very surprised dhcpcd-8.1.5 works for you adding IPv6 addresses here, but
master fails. Checking the sources the differences between if-linux.c on -8 and
master only shows diffs for privsep and fixing compile warnings using clang.
Can you try this patch which removes the fixed compile warnings change?
That reduces the difference to just privsep changes which should be a non op for
you.
To apply the patch from top level directory in dhcpcd:
patch -p1 </path/to/patch
Roy
diff --git a/src/if-linux.c b/src/if-linux.c
index 0242fd12..142064e5 100644
--- a/src/if-linux.c
+++ b/src/if-linux.c
@@ -110,6 +110,7 @@ int if_getssid_wext(const char *ifname, uint8_t *ssid);
#endif
/* Someone should fix kernel headers for clang alignment warnings . */
+#if 0
#undef IFA_RTA
#define IFA_RTA(r) ((struct rtattr *)(void *)(((char *)(r)) \
+ NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
@@ -126,6 +127,7 @@ int if_getssid_wext(const char *ifname, uint8_t *ssid);
#define RTA_NEXT(rta, attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \
(struct rtattr *)(void *)(((char *)(rta)) \
+ RTA_ALIGN((rta)->rta_len)))
+#endif
struct priv {
int route_fd;
Archive administrator: postmaster@marples.name