mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
busybox: fix udhcpc endless loop
if the interface is down due to ip-collide detection, config apply fail as the dnsmasq init script would loop endlessly. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
From 912cf16c2f15d2081049eafe8d336dbc2b7d8c78 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Thu, 9 Nov 2023 12:28:38 +0100
|
||||
Subject: [PATCH] busybox: udhcpc would enter an endless loop if the interface
|
||||
is down
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
.../busybox/patches/532-dhcp-socket-reopen.patch | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
create mode 100644 package/utils/busybox/patches/532-dhcp-socket-reopen.patch
|
||||
|
||||
diff --git a/package/utils/busybox/patches/532-dhcp-socket-reopen.patch b/package/utils/busybox/patches/532-dhcp-socket-reopen.patch
|
||||
new file mode 100644
|
||||
index 0000000000..17cec7764a
|
||||
--- /dev/null
|
||||
+++ b/package/utils/busybox/patches/532-dhcp-socket-reopen.patch
|
||||
@@ -0,0 +1,13 @@
|
||||
+Index: busybox-1.36.1/networking/udhcp/dhcpc.c
|
||||
+===================================================================
|
||||
+--- busybox-1.36.1.orig/networking/udhcp/dhcpc.c
|
||||
++++ busybox-1.36.1/networking/udhcp/dhcpc.c
|
||||
+@@ -1638,6 +1645,8 @@ int udhcpc_main(int argc UNUSED_PARAM, c
|
||||
+ bb_error_msg("read error: "STRERROR_FMT", reopening socket" STRERROR_ERRNO);
|
||||
+ sleep(discover_timeout); /* 3 seconds by default */
|
||||
+ change_listen_mode(client_data.listen_mode); /* just close and reopen */
|
||||
++ packet_num++;
|
||||
++ timeout = 0;
|
||||
+ }
|
||||
+ if (len < 0)
|
||||
+ continue;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user