[syslinux:master] tftp: Report server IP address on debug message
syslinux-bot for Erwan Velu
erwanaliasr1 at gmail.com
Fri Sep 4 09:15:07 PDT 2015
Commit-ID: 66105926f3d748de827eb863913171efb9624165
Gitweb: http://www.syslinux.org/commit/66105926f3d748de827eb863913171efb9624165
Author: Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Wed, 2 Sep 2015 18:26:37 +0200
Committer: Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Fri, 4 Sep 2015 17:57:52 +0200
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.
---
core/fs/pxe/tftp.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/core/fs/pxe/tftp.c b/core/fs/pxe/tftp.c
index 446da63..113ede2 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;
}
More information about the Syslinux-commits
mailing list