aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/udhcp/d6_packet.c2
-rw-r--r--networking/udhcp/dhcpc.c7
-rw-r--r--networking/udhcp/packet.c6
3 files changed, 10 insertions, 5 deletions
diff --git a/networking/udhcp/d6_packet.c b/networking/udhcp/d6_packet.c
index a0656c1da..493943d72 100644
--- a/networking/udhcp/d6_packet.c
+++ b/networking/udhcp/d6_packet.c
@@ -18,7 +18,7 @@ void FAST_FUNC d6_dump_packet(struct d6_packet *packet)
18 return; 18 return;
19 19
20 bb_error_msg( 20 bb_error_msg(
21 "xid %x" 21 " xid %x"
22 , packet->d6_xid32 22 , packet->d6_xid32
23 ); 23 );
24 //*bin2hex(buf, (void *) packet->chaddr, sizeof(packet->chaddr)) = '\0'; 24 //*bin2hex(buf, (void *) packet->chaddr, sizeof(packet->chaddr)) = '\0';
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 2ae8bcc4d..4548d4ac7 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1534,6 +1534,13 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1534 */ 1534 */
1535 if (send_renew(xid, server_addr, requested_ip) >= 0) { 1535 if (send_renew(xid, server_addr, requested_ip) >= 0) {
1536 timeout >>= 1; 1536 timeout >>= 1;
1537//TODO: the timeout to receive an answer for our renew should not be selected
1538//with "timeout = lease_seconds / 2; ...; timeout = timeout / 2": it is often huge.
1539//Waiting e.g. 4*3600 seconds for a reply does not make sense
1540//(if reply isn't coming, we keep an open socket for hours),
1541//it should be something like 10 seconds.
1542//Also, it's probably best to try sending renew in kernel mode a few (3-5) times
1543//and fall back to raw mode if it does not work.
1537 continue; 1544 continue;
1538 } 1545 }
1539 /* else: error sending. 1546 /* else: error sending.
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c
index ad0028bd0..fc2bb5416 100644
--- a/networking/udhcp/packet.c
+++ b/networking/udhcp/packet.c
@@ -41,7 +41,7 @@ void FAST_FUNC udhcp_dump_packet(struct dhcp_packet *packet)
41 return; 41 return;
42 42
43 bb_error_msg( 43 bb_error_msg(
44 //"op %x" 44 //" op %x"
45 //" htype %x" 45 //" htype %x"
46 " hlen %x" 46 " hlen %x"
47 //" hops %x" 47 //" hops %x"
@@ -52,7 +52,6 @@ void FAST_FUNC udhcp_dump_packet(struct dhcp_packet *packet)
52 " yiaddr %x" 52 " yiaddr %x"
53 " siaddr %x" 53 " siaddr %x"
54 " giaddr %x" 54 " giaddr %x"
55 //" chaddr %s"
56 //" sname %s" 55 //" sname %s"
57 //" file %s" 56 //" file %s"
58 //" cookie %x" 57 //" cookie %x"
@@ -68,14 +67,13 @@ void FAST_FUNC udhcp_dump_packet(struct dhcp_packet *packet)
68 , packet->yiaddr 67 , packet->yiaddr
69 , packet->siaddr_nip 68 , packet->siaddr_nip
70 , packet->gateway_nip 69 , packet->gateway_nip
71 //, packet->chaddr[16]
72 //, packet->sname[64] 70 //, packet->sname[64]
73 //, packet->file[128] 71 //, packet->file[128]
74 //, packet->cookie 72 //, packet->cookie
75 //, packet->options[] 73 //, packet->options[]
76 ); 74 );
77 *bin2hex(buf, (void *) packet->chaddr, sizeof(packet->chaddr)) = '\0'; 75 *bin2hex(buf, (void *) packet->chaddr, sizeof(packet->chaddr)) = '\0';
78 bb_error_msg("chaddr %s", buf); 76 bb_error_msg(" chaddr %s", buf);
79} 77}
80#endif 78#endif
81 79