dhcpcd-discuss

Re: dhcp6_listen: Address already in use

Roy Marples

Wed May 16 19:37:45 2018

On 16/05/2018 17:01, Moritz Warning wrote:
On 05/16/2018 10:28 AM, Roy Marples wrote:
Hi Moritz

On 15/05/2018 23:37, Moritz Warning wrote:
from dhcpcd 7.0.4-1 on Arch Linux gives me "dhcp6_listen: Address already in use" and exits.
The problem appears when connecting to my WLAN using wicd 1.7.4-1:



May 15 23:26:22 brick dhcpcd[18975]: forked to background, child pid 19022
May 15 23:26:22 brick dhcpcd[18975]: dhcp6_listen: Address already in use

Attached patch should solve this error.

May 15 23:26:22 brick dhcpcd[19025]: sending signal ALRM to pid 19022
May 15 23:26:22 brick dhcpcd[19025]: waiting for pid 19022 to exit
May 15 23:26:22 brick dhcpcd[19022]: received SIGALRM, releasing

Something called `dhcpcd -k` here which releases the lease as you see.
I think that is the real error - does wicd do that?

Can you let me know if the patch addresses the listen error please?

Thanks

Roy
diff --git a/src/ipv6.c b/src/ipv6.c
index 82cf71b6..492521f8 100644
--- a/src/ipv6.c
+++ b/src/ipv6.c
@@ -1175,8 +1175,10 @@ ipv6_handleifa(struct dhcpcd_ctx *ctx,
 	}
 
 	if (ia != NULL) {
-		ipv6nd_handleifa(cmd, ia, pid);
-		dhcp6_handleifa(cmd, ia, pid);
+		if (!(ctx->options & DHCPCD_FORKED)) {
+			ipv6nd_handleifa(cmd, ia, pid);
+			dhcp6_handleifa(cmd, ia, pid);
+		}
 
 		/* Done with the ia now, so free it. */
 		if (cmd == RTM_DELADDR)

Follow-Ups:
Re: dhcp6_listen: Address already in useMoritz Warning
References:
dhcp6_listen: Address already in useMoritz Warning
Re: dhcp6_listen: Address already in useRoy Marples
Re: dhcp6_listen: Address already in useMoritz Warning
Archive administrator: postmaster@marples.name