dhcpcd-discuss

ipv6_newaddr: Invalid argument

Breno Leitao

Mon Jun 17 16:13:30 2019

Hi,

I have a Linux system where dhcpcd is responsible for all the IPv6 network config, and Linux has autoconf disabled (/proc/sys/net/ipv6/conf/all/autoconf = 0).

Everything works pretty well, but I am getting the following error from time to time, which is annoying:

	ipv6_newaddr: Invalid argument

The problem seems to be related to ipv6_newaddr() being called with a package with IPV6_AF_AUTOCONF set, and prefix = 128.

Since the package is IPV6_AF_AUTOCONF, then ipv6_makeaddr() is called, and it returns EINVAL as saw above:

	if (prefix_len < 0 || prefix_len > 120) {
		errno = EINVAL;
	 	return -1;
 	}

Since I am new to the IPv6 world, I was wondering if I should enable dhcpcd to handle temporary address (IPV6_MANAGETEMPADDR), but, looking further, it seems this option is disabled on Linux:

	#if defined(IN6_IFF_TEMPORARY) && !defined(__linux__)
	#define IPV6_MANAGETEMPADDR
	#endif

That said, I am wondering if I am reading the problem properly, and if my debug makes any sense.

Thanks
Breno

Follow-Ups:
Re: ipv6_newaddr: Invalid argumentRoy Marples
Archive administrator: postmaster@marples.name