243-udhcpc_changed_ifindex.patch 631 B

123456789101112131415
  1. --- a/networking/udhcp/dhcpc.c
  2. +++ b/networking/udhcp/dhcpc.c
  3. @@ -319,6 +319,12 @@
  4. for (;;) {
  5. unsigned timestamp_before_wait;
  6. + /* When running on a bridge, the ifindex may have changed (e.g. if
  7. + * member interfaces were added/removed or if the status of the
  8. + * bridge changed).
  9. + * Workaround: refresh it here before processing the next packet */
  10. + read_interface(client_config.interface, &client_config.ifindex, NULL, client_config.arp);
  11. +
  12. if (listen_mode != LISTEN_NONE && sockfd < 0) {
  13. if (listen_mode == LISTEN_KERNEL)
  14. sockfd = listen_socket(/*INADDR_ANY,*/ CLIENT_PORT, client_config.interface);