aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-10-20 21:38:29 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-10-20 21:38:29 +0200
commita5048fa386b4c54f269c0a23c579970acdd1edd5 (patch)
treeff5228a029898d391f53198a74c005b02c41b6a6
parentb3af65b95de883e9be403e065f57b867d8ea8d43 (diff)
downloadbusybox-a5048fa386b4c54f269c0a23c579970acdd1edd5.tar.gz
udhcpc: periodically reread our ifindex and mac
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/udhcp/dhcpc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index f685a1d22..f0c8ace2d 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1167,6 +1167,16 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
* resend discover/renew/whatever
*/
if (retval == 0) {
+ /* 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).
+ * Refresh ifindex and client_mac:
+ */
+ udhcp_read_interface(client_config.interface,
+ &client_config.ifindex,
+ NULL,
+ client_config.client_mac);
+
/* We will restart the wait in any case */
already_waited_sec = 0;