openwrtv3/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch
Hannu Nyman 12fb4bb834 busybox: update to 1.29.2
* Update busybox to 1.29.2
* refresh default config
* remove upstreamed patches

Config refreshed with
  cd config/
  ../convert_menuconfig.pl ../../../../build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/busybox-1.29.2
  cd ..
  ./convert_defaults.pl < ../../../build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/busybox-1.29.2/.config > Config-defaults.in

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Tested-by: Hans Dedecker <dedeckeh@gmail.com>
2018-08-02 22:36:00 +02:00

15 lines
680 B
Diff

--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1407,6 +1407,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
/* 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 */
+ udhcp_read_interface(client_config.interface, &client_config.ifindex, NULL, client_config.client_mac);
+
//bb_error_msg("sockfd:%d, listen_mode:%d", sockfd, listen_mode);
/* Was opening raw or udp socket here