aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/arping.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/networking/arping.c b/networking/arping.c
index 6b0de4de2..4f207eaa5 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -231,20 +231,23 @@ static void recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM)
231 if (!(option_mask32 & QUIET)) { 231 if (!(option_mask32 & QUIET)) {
232 int s_printed = 0; 232 int s_printed = 0;
233 233
234 printf("%scast re%s from %s [%s]", 234 printf("%scast re%s from %s [%02x:%02x:%02x:%02x:%02x:%02x]",
235 FROM->sll_pkttype == PACKET_HOST ? "Uni" : "Broad", 235 FROM->sll_pkttype == PACKET_HOST ? "Uni" : "Broad",
236 ah->ar_op == htons(ARPOP_REPLY) ? "ply" : "quest", 236 ah->ar_op == htons(ARPOP_REPLY) ? "ply" : "quest",
237 inet_ntoa(src_ip), 237 inet_ntoa(src_ip),
238 ether_ntoa((struct ether_addr *) p)); 238 p[0], p[1], p[2], p[3], p[4], p[5]
239 );
239 if (dst_ip.s_addr != src.s_addr) { 240 if (dst_ip.s_addr != src.s_addr) {
240 printf("for %s ", inet_ntoa(dst_ip)); 241 printf("for %s ", inet_ntoa(dst_ip));
241 s_printed = 1; 242 s_printed = 1;
242 } 243 }
243 if (memcmp(p + ah->ar_hln + 4, me.sll_addr, ah->ar_hln)) { 244 if (memcmp(p + ah->ar_hln + 4, me.sll_addr, ah->ar_hln)) {
245 unsigned char *pp = p + ah->ar_hln + 4;
244 if (!s_printed) 246 if (!s_printed)
245 printf("for "); 247 printf("for ");
246 printf("[%s]", 248 printf("[%02x:%02x:%02x:%02x:%02x:%02x]",
247 ether_ntoa((struct ether_addr *) p + ah->ar_hln + 4)); 249 pp[0], pp[1], pp[2], pp[3], pp[4], pp[5]
250 );
248 } 251 }
249 252
250 if (last) { 253 if (last) {