diff options
author | 2016-09-11 19:44:43 +0000 | |
---|---|---|
committer | 2016-09-11 19:44:43 +0000 | |
commit | aef2647babfa7f0f0e3e06d9714b94b195ed80a7 (patch) | |
tree | f78af7dc3b98416de4903f99480c407f552c15f6 | |
parent | Set owner for /etc/{passwd,pwd.db,spwd.db} and /var/sysmerge/etcsum. (diff) | |
download | wireguard-openbsd-aef2647babfa7f0f0e3e06d9714b94b195ed80a7.tar.xz wireguard-openbsd-aef2647babfa7f0f0e3e06d9714b94b195ed80a7.zip |
The canonical way to find out if we can have timing stats is timinginfo.
-rw-r--r-- | sbin/ping/ping.c | 4 | ||||
-rw-r--r-- | sbin/ping6/ping6.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 8cd234c39e5..92ee15cc006 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.174 2016/09/11 18:28:31 florian Exp $ */ +/* $OpenBSD: ping.c,v 1.175 2016/09/11 19:44:43 florian Exp $ */ /* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */ /* @@ -958,7 +958,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) (void)printf("%d bytes from %s: icmp_seq=%u", cc, pr_addr(from, fromlen), ntohs(seq)); (void)printf(" ttl=%d", ip->ip_ttl); - if (cc >= 8 + sizeof(struct payload)) + if (timinginfo) (void)printf(" time=%.3f ms", triptime); if (dupflag) (void)printf(" (DUP!)"); diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c index c9603fed0b7..987df76472b 100644 --- a/sbin/ping6/ping6.c +++ b/sbin/ping6/ping6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping6.c,v 1.179 2016/09/11 18:29:10 florian Exp $ */ +/* $OpenBSD: ping6.c,v 1.180 2016/09/11 19:44:43 florian Exp $ */ /* $KAME: ping6.c,v 1.163 2002/10/25 02:19:06 itojun Exp $ */ /* @@ -1068,7 +1068,7 @@ pr_pack(u_char *buf, int cc, struct msghdr *mhdr) pr_addr((struct sockaddr *)&dstsa, sizeof(dstsa))); } - if (timing) + if (timinginfo) (void)printf(" time=%.3f ms", triptime); if (dupflag) (void)printf(" (DUP!)"); |