Re: ipv6_newaddr: Invalid argument
Roy Marples
Thu Jan 09 01:25:03 2020
On 09/01/2020 00:39, Mike Goodman wrote:
Hi Roy,
Thanks for the response, and a quick one at that.
On the server in question the Arch release (from uname -r) is 5.4.8-arch1-1. and
dhcpcd --version gives dhcpcd 8.1.5.
To the best of my knowledge, both are pretty well up to date. I have attempted
to make and keep them so.
I understand the scepticism though. Arch when I took on the server was indeed
ancient. It is good practice to run pacman -Syy at least as often as pacman -Syu
to keep the repos up to date as the hosts often backdate them to their defaults
as they run their maintenance schedules.
OK, so up to date.
And to be truthful my brain farted - ipv6_newaddr isn't affected by headers.
I was thinking of if_address6, which is.
Does this patch help at all?
Let me know.
Roy
diff --git a/src/ipv6.c b/src/ipv6.c
index c49300c1..92403912 100644
--- a/src/ipv6.c
+++ b/src/ipv6.c
@@ -1554,7 +1554,9 @@ ipv6_newaddr(struct interface *ifp, const struct in6_addr
*addr,
tempaddr = false;
#endif
- if (ia->flags & IPV6_AF_AUTOCONF && !tempaddr) {
+ if (prefix_len == 128)
+ goto makepfx;
+ else if (ia->flags & IPV6_AF_AUTOCONF && !tempaddr) {
ia->prefix = *addr;
ia->dadcounter = ipv6_makeaddr(&ia->addr, ifp,
&ia->prefix,
@@ -1570,13 +1572,12 @@ ipv6_newaddr(struct interface *ifp, const struct
in6_addr *addr,
#else
return ia;
#endif
- } else if (ia->flags & (IPV6_AF_REQUEST | IPV6_AF_DELEGATEDPFX) &&
- prefix_len != 128)
- {
+ } else if (ia->flags & (IPV6_AF_REQUEST | IPV6_AF_DELEGATEDPFX)) {
ia->prefix = *addr;
cbp = inet_ntop(AF_INET6, &ia->prefix, buf, sizeof(buf));
goto paddr;
} else {
+makepfx:
ia->addr = *addr;
if (ipv6_makeprefix(&ia->prefix,
&ia->addr, ia->prefix_len) == -1)
Archive administrator: postmaster@marples.name