diff options
author | Denys Vlasenko | 2017-09-29 18:02:01 +0200 |
---|---|---|
committer | Denys Vlasenko | 2017-09-29 18:02:01 +0200 |
commit | f625836e6059d307e951a60b60f1c9ed259ee983 (patch) | |
tree | 1e4be21937a6b9d23969b1a4b2ab95428ebcb048 /networking/udhcp | |
parent | a6a3ad327360669e0c12552f680382e3b9713489 (diff) | |
download | busybox-f625836e6059d307e951a60b60f1c9ed259ee983.zip busybox-f625836e6059d307e951a60b60f1c9ed259ee983.tar.gz |
udhcpc[6]: make log2 messages for chaddr field indented like the rest
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp')
-rw-r--r-- | networking/udhcp/d6_packet.c | 2 | ||||
-rw-r--r-- | networking/udhcp/dhcpc.c | 7 | ||||
-rw-r--r-- | networking/udhcp/packet.c | 6 |
3 files changed, 10 insertions, 5 deletions
diff --git a/networking/udhcp/d6_packet.c b/networking/udhcp/d6_packet.c index a0656c1..493943d 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) return; bb_error_msg( - "xid %x" + " xid %x" , packet->d6_xid32 ); //*bin2hex(buf, (void *) packet->chaddr, sizeof(packet->chaddr)) = '\0'; diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 2ae8bcc..4548d4a 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c @@ -1534,6 +1534,13 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) */ if (send_renew(xid, server_addr, requested_ip) >= 0) { timeout >>= 1; +//TODO: the timeout to receive an answer for our renew should not be selected +//with "timeout = lease_seconds / 2; ...; timeout = timeout / 2": it is often huge. +//Waiting e.g. 4*3600 seconds for a reply does not make sense +//(if reply isn't coming, we keep an open socket for hours), +//it should be something like 10 seconds. +//Also, it's probably best to try sending renew in kernel mode a few (3-5) times +//and fall back to raw mode if it does not work. continue; } /* else: error sending. diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index ad0028b..fc2bb54 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) return; bb_error_msg( - //"op %x" + //" op %x" //" htype %x" " hlen %x" //" hops %x" @@ -52,7 +52,6 @@ void FAST_FUNC udhcp_dump_packet(struct dhcp_packet *packet) " yiaddr %x" " siaddr %x" " giaddr %x" - //" chaddr %s" //" sname %s" //" file %s" //" cookie %x" @@ -68,14 +67,13 @@ void FAST_FUNC udhcp_dump_packet(struct dhcp_packet *packet) , packet->yiaddr , packet->siaddr_nip , packet->gateway_nip - //, packet->chaddr[16] //, packet->sname[64] //, packet->file[128] //, packet->cookie //, packet->options[] ); *bin2hex(buf, (void *) packet->chaddr, sizeof(packet->chaddr)) = '\0'; - bb_error_msg("chaddr %s", buf); + bb_error_msg(" chaddr %s", buf); } #endif |