summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-01-23 09:50:40 +0000
committerRon Yorston <rmy@pobox.com>2015-01-23 09:50:40 +0000
commit63dbf1908bc51918d9d963f4d9b7657306b2970d (patch)
tree781ebfdcbbb953688e06f3541ce9e0c71f1dadfa /networking
parent06900749637b925af1ebdf5030ba03a379f4f84f (diff)
parent6968e081230fb6434a2a6f0eed39d538ea982f3f (diff)
downloadbusybox-w32-TIG_1_23_0.tar.gz
busybox-w32-TIG_1_23_0.tar.bz2
busybox-w32-TIG_1_23_0.zip
Merge commit '1_23_0' into mergeTIG_1_23_0
Conflicts: libbb/lineedit.c
Diffstat (limited to '')
-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) {