diff options
Diffstat (limited to 'networking/udhcp/packet.c')
-rw-r--r-- | networking/udhcp/packet.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index 148f52551..0a31f2643 100644 --- a/networking/udhcp/packet.c +++ b/networking/udhcp/packet.c | |||
@@ -38,8 +38,8 @@ void FAST_FUNC udhcp_dump_packet(struct dhcp_packet *packet) | |||
38 | if (dhcp_verbose < 2) | 38 | if (dhcp_verbose < 2) |
39 | return; | 39 | return; |
40 | 40 | ||
41 | bb_info_msg( | 41 | bb_error_msg( |
42 | //" op %x" | 42 | //"op %x" |
43 | //" htype %x" | 43 | //" htype %x" |
44 | " hlen %x" | 44 | " hlen %x" |
45 | //" hops %x" | 45 | //" hops %x" |
@@ -73,7 +73,7 @@ void FAST_FUNC udhcp_dump_packet(struct dhcp_packet *packet) | |||
73 | //, packet->options[] | 73 | //, packet->options[] |
74 | ); | 74 | ); |
75 | *bin2hex(buf, (void *) packet->chaddr, sizeof(packet->chaddr)) = '\0'; | 75 | *bin2hex(buf, (void *) packet->chaddr, sizeof(packet->chaddr)) = '\0'; |
76 | bb_info_msg(" chaddr %s", buf); | 76 | bb_error_msg("chaddr %s", buf); |
77 | } | 77 | } |
78 | #endif | 78 | #endif |
79 | 79 | ||
@@ -85,17 +85,17 @@ int FAST_FUNC udhcp_recv_kernel_packet(struct dhcp_packet *packet, int fd) | |||
85 | memset(packet, 0, sizeof(*packet)); | 85 | memset(packet, 0, sizeof(*packet)); |
86 | bytes = safe_read(fd, packet, sizeof(*packet)); | 86 | bytes = safe_read(fd, packet, sizeof(*packet)); |
87 | if (bytes < 0) { | 87 | if (bytes < 0) { |
88 | log1("Packet read error, ignoring"); | 88 | log1("packet read error, ignoring"); |
89 | return bytes; /* returns -1 */ | 89 | return bytes; /* returns -1 */ |
90 | } | 90 | } |
91 | 91 | ||
92 | if (bytes < offsetof(struct dhcp_packet, options) | 92 | if (bytes < offsetof(struct dhcp_packet, options) |
93 | || packet->cookie != htonl(DHCP_MAGIC) | 93 | || packet->cookie != htonl(DHCP_MAGIC) |
94 | ) { | 94 | ) { |
95 | bb_info_msg("Packet with bad magic, ignoring"); | 95 | bb_error_msg("packet with bad magic, ignoring"); |
96 | return -2; | 96 | return -2; |
97 | } | 97 | } |
98 | log1("Received a packet"); | 98 | log1("received %s", "a packet"); |
99 | udhcp_dump_packet(packet); | 99 | udhcp_dump_packet(packet); |
100 | 100 | ||
101 | return bytes; | 101 | return bytes; |