lede/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch

16 lines
698 B
Diff
Raw Normal View History

2017-09-06 19:19:45 +08:00
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1415,6 +1415,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
2017-09-06 19:19:45 +08:00
/* silence "uninitialized!" warning */
unsigned timestamp_before_wait = timestamp_before_wait;
+ /* When running on a bridge, the ifindex may have changed (e.g. if
+ * member interfaces were added/removed or if the status of the
+ * bridge changed).
+ * Workaround: refresh it here before processing the next packet */
2020-07-02 23:30:56 +08:00
+ udhcp_read_interface(client_data.interface, &client_data.ifindex, NULL, client_data.client_mac);
2017-09-06 19:19:45 +08:00
+
2020-07-02 23:30:56 +08:00
//bb_error_msg("sockfd:%d, listen_mode:%d", client_data.sockfd, client_data.listen_mode);
2017-09-06 19:19:45 +08:00
/* Was opening raw or udp socket here