dhcpcd-discuss

Re: dhcpcd-gtk HEAD loops endlessly on start

Roy Marples

Sat Nov 28 08:00:41 2020

Hi Hanno

On 27/11/2020 20:09, Hanno Zysik wrote:
Hi all!

I just wanted to report that dhcpcd-gtk build from HEAD loops endlessly
on start with open/close connection messages.

Bad commit is:
https://roy.marples.name/cgit/dhcpcd-ui.git/commit/?id=7e0666e2059b66927d5144a20f0846bb4db54ab5

Bad Hunk from src/libdhcpcd/dhcpcd.c
@@ -1063,8 +1070,10 @@ dhcpcd_open(DHCPCD_CONNECTION *con, bool privileged)
  	memcpy(&nifs, cmd, sizeof(nifs));
  	/* We don't dispatch each interface here as that
  	 * causes too much notification spam when the GUI starts */
-	for (n = 0; n < nifs; n++)
-		dhcpcd_read_if(con, con->command_fd);
+	for (n = 0; n < nifs; n++) {
+		if (dhcpcd_read_if(con, con->command_fd) == NULL)
+			goto err_exit;
+	}

  	update_status(con, DHC_UNKNOWN);


Reversed that hunk and dhcpcd-gtk starts just fine.

Which dhcpcd version do you see this looping with?

Roy

Follow-Ups:
Re: dhcpcd-gtk HEAD loops endlessly on startHanno Zysik
References:
dhcpcd-gtk HEAD loops endlessly on startHanno Zysik
Archive administrator: postmaster@marples.name