summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown2014-10-23 16:04:10 +0200
committerMichael Brown2014-10-23 16:04:10 +0200
commitd1afe731eae1f0f97238de5213df1610d0ccf4ed (patch)
tree1f33ce9929a4373a6a8a3a38a69d0cb91d06aa84 /src/usr
parent[efi] Include NII driver within "snp" and "snponly" build targets (diff)
downloadipxe-d1afe731eae1f0f97238de5213df1610d0ccf4ed.tar.gz
ipxe-d1afe731eae1f0f97238de5213df1610d0ccf4ed.tar.xz
ipxe-d1afe731eae1f0f97238de5213df1610d0ccf4ed.zip
[ping] Report timed-out pings via the callback function
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/pingmgmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/pingmgmt.c b/src/usr/pingmgmt.c
index 2d4db491..cf6a5111 100644
--- a/src/usr/pingmgmt.c
+++ b/src/usr/pingmgmt.c
@@ -36,7 +36,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
/**
* Display ping result
*
- * @v src Source socket address
+ * @v src Source socket address, or NULL
* @v sequence Sequence number
* @v len Payload length
* @v rc Status code
@@ -46,7 +46,7 @@ static void ping_callback ( struct sockaddr *peer, unsigned int sequence,
/* Display ping response */
printf ( "%zd bytes from %s: seq=%d",
- len, sock_ntoa ( peer ), sequence );
+ len, ( peer ? sock_ntoa ( peer ) : "<none>" ), sequence );
if ( rc != 0 )
printf ( ": %s", strerror ( rc ) );
printf ( "\n" );