*/
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.
return;
bb_error_msg(
- //"op %x"
+ //" op %x"
//" htype %x"
" hlen %x"
//" hops %x"
" yiaddr %x"
" siaddr %x"
" giaddr %x"
- //" chaddr %s"
//" sname %s"
//" file %s"
//" cookie %x"
, 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