diff options
author | Erwan Velu <erwanaliasr1@gmail.com> | 2015-09-02 18:26:37 +0200 |
---|---|---|
committer | Erwan Velu <erwanaliasr1@gmail.com> | 2015-09-04 17:57:52 +0200 |
commit | 66105926f3d748de827eb863913171efb9624165 (patch) | |
tree | 3647a3daa4390a959e33aea7c15685ba8df305b6 | |
parent | d0fde22e65cb2c7b8af8e7d8a9f08d5de7941876 (diff) | |
download | syslinux-66105926f3d748de827eb863913171efb9624165.tar.gz syslinux-66105926f3d748de827eb863913171efb9624165.tar.xz syslinux-66105926f3d748de827eb863913171efb9624165.zip |
tftp: Report server IP address on debug message
When debugging, it is very useful to get the ip adress of the server
that reponsded to that packet.
-rw-r--r-- | core/fs/pxe/tftp.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/fs/pxe/tftp.c b/core/fs/pxe/tftp.c index 446da634..113ede2e 100644 --- a/core/fs/pxe/tftp.c +++ b/core/fs/pxe/tftp.c @@ -259,7 +259,16 @@ wait_pkt: } else { /* Make sure the packet actually came from the server and is long enough for a TFTP opcode */ - dprintf("tftp_open: got packet buflen=%d\n", buf_len); + dprintf("tftp_open: got packet buflen=%d from server %u.%u.%u.%u(%u.%u.%u.%u)\n", + buf_len, + ((uint8_t *)&src_ip)[0], + ((uint8_t *)&src_ip)[1], + ((uint8_t *)&src_ip)[2], + ((uint8_t *)&src_ip)[3], + ((uint8_t *)&url->ip)[0], + ((uint8_t *)&url->ip)[1], + ((uint8_t *)&url->ip)[2], + ((uint8_t *)&url->ip)[3]); if ((src_ip == url->ip) && (buf_len >= 2)) break; } |