Re: ipv6_newaddr: Invalid argument
Mike Goodman
Fri Jan 10 23:00:03 2020
Hi Roy,
After a lot of web searches and reading, I still don't know how to apply
that patch. I've searched the file system on the server to find a file
which looks something like what the patch may be designed to alter.
Nothing similar in the kernel directories no in any of /usr/bin/dhcpcd
/usr/lib/dhcpcd /etc/dhcpcd.conf /usr/share/dhcpcd. I thought possibly a
hook file in /etc/dhcpcd.conf but none there. Am I even in the right area?
Also, a question - in line 5 which begins @@, is this correct - const
struct as two words? I can see there is struct earlier in the line so
probably correct.
So, I've got as far as a command which may work is I save what you've
sent as something.patch then run patch patchtargetfile something.patch
it may work, assuming I can find the patchtarget file and cd into the
same directory?
Thanks,
Mike
On 09/01/2020 01:25, Roy Marples wrote:
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