summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
Diffstat (limited to 'networking')
-rw-r--r--networking/udhcp/dhcpc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 35e7c2070..a34829c3a 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1697,6 +1697,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1697 case RENEW_REQUESTED: 1697 case RENEW_REQUESTED:
1698 case REBINDING: 1698 case REBINDING:
1699 if (*message == DHCPACK) { 1699 if (*message == DHCPACK) {
1700 unsigned start;
1700 uint32_t lease_seconds; 1701 uint32_t lease_seconds;
1701 struct in_addr temp_addr; 1702 struct in_addr temp_addr;
1702 uint8_t *temp; 1703 uint8_t *temp;
@@ -1756,7 +1757,10 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1756 bb_info_msg("Lease of %s obtained, lease time %u", 1757 bb_info_msg("Lease of %s obtained, lease time %u",
1757 inet_ntoa(temp_addr), (unsigned)lease_seconds); 1758 inet_ntoa(temp_addr), (unsigned)lease_seconds);
1758 requested_ip = packet.yiaddr; 1759 requested_ip = packet.yiaddr;
1760
1761 start = monotonic_sec();
1759 udhcp_run_script(&packet, state == REQUESTING ? "bound" : "renew"); 1762 udhcp_run_script(&packet, state == REQUESTING ? "bound" : "renew");
1763 already_waited_sec = (unsigned)monotonic_sec() - start;
1760 1764
1761 state = BOUND; 1765 state = BOUND;
1762 change_listen_mode(LISTEN_NONE); 1766 change_listen_mode(LISTEN_NONE);
@@ -1774,7 +1778,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1774#endif 1778#endif
1775 /* make future renew packets use different xid */ 1779 /* make future renew packets use different xid */
1776 /* xid = random_xid(); ...but why bother? */ 1780 /* xid = random_xid(); ...but why bother? */
1777 already_waited_sec = 0; 1781
1778 continue; /* back to main loop */ 1782 continue; /* back to main loop */
1779 } 1783 }
1780 if (*message == DHCPNAK) { 1784 if (*message == DHCPNAK) {