udhcpc: improve logs - show offer as it is received

function                                             old     new   delta
udhcpc_main                                         2566    2608     +42
.rodata                                           103248  103272     +24
udhcp_recv_raw_packet                                559     562      +3
d6_recv_raw_packet                                   254     255      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 70/0)               Total: 70 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2021-06-02 19:51:52 +02:00
parent 0ae53451cf
commit 4bbc391c7f
4 changed files with 14 additions and 8 deletions

View File

@@ -95,7 +95,8 @@ int FAST_FUNC udhcp_recv_kernel_packet(struct dhcp_packet *packet, int fd)
bb_simple_info_msg("packet with bad magic, ignoring");
return -2;
}
log1("received %s", "a packet");
log2("received %s", "a packet");
/* log2 because more informative msg for valid packets is printed later at log1 level */
udhcp_dump_packet(packet);
return bytes;