Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/ping6 In ping6, there's no blank space in the ping pack...
details: https://anonhg.NetBSD.org/src/rev/5219ede778d3
branches: trunk
changeset: 983809:5219ede778d3
user: dholland <dholland%NetBSD.org@localhost>
date: Mon Jun 07 22:13:34 2021 +0000
description:
In ping6, there's no blank space in the ping packets by default.
- document that if you use -p to specify a fill pattern you need to
make the packets bigger with -s;
- warn if -p is used and there's not at least one byte of fill space.
PR 56057
diffstat:
sbin/ping6/ping6.8 | 8 ++++++--
sbin/ping6/ping6.c | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diffs (58 lines):
diff -r bc1a2e5875f3 -r 5219ede778d3 sbin/ping6/ping6.8
--- a/sbin/ping6/ping6.8 Mon Jun 07 21:44:35 2021 +0000
+++ b/sbin/ping6/ping6.8 Mon Jun 07 22:13:34 2021 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: ping6.8,v 1.33 2018/04/23 18:44:39 maxv Exp $
+.\" $NetBSD: ping6.8,v 1.34 2021/06/07 22:13:34 dholland Exp $
.\" $KAME: ping6.8,v 1.57 2002/05/26 13:18:25 itojun Exp $
.\"
.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 23, 2018
+.Dd June 7, 2021
.Dt PING6 8
.Os
.Sh NAME
@@ -202,6 +202,10 @@
.Dq Li \-p ff
will cause the sent packet to be filled with all
ones.
+Note that for IPv6 there is no fill space by default so it is
+necessary to also use the
+.Fl s
+option to expand the packet.
.\" new IPsec
.It Fl q
Quiet output.
diff -r bc1a2e5875f3 -r 5219ede778d3 sbin/ping6/ping6.c
--- a/sbin/ping6/ping6.c Mon Jun 07 21:44:35 2021 +0000
+++ b/sbin/ping6/ping6.c Mon Jun 07 22:13:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ping6.c,v 1.104 2021/05/23 07:17:50 thorpej Exp $ */
+/* $NetBSD: ping6.c,v 1.105 2021/06/07 22:13:34 dholland Exp $ */
/* $KAME: ping6.c,v 1.164 2002/11/16 14:05:37 itojun Exp $ */
/*
@@ -77,7 +77,7 @@
#else
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ping6.c,v 1.104 2021/05/23 07:17:50 thorpej Exp $");
+__RCSID("$NetBSD: ping6.c,v 1.105 2021/06/07 22:13:34 dholland Exp $");
#endif
#endif
@@ -569,6 +569,10 @@
} else
target = argv[argc - 1];
+ if ((options & F_PINGFILLED) != 0 && datalen <= (int)ICMP6ECHOTMLEN) {
+ warnx("-p: No fill space; increase packet size with -s");
+ }
+
/* getaddrinfo */
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_flags = AI_CANONNAME;
Home |
Main Index |
Thread Index |
Old Index