git: 99ec65e7fe61 - main - traceroute6(8): Stop probing on networks rejected.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 08 Jun 2025 15:22:51 UTC
The branch main has been updated by otis:
URL: https://cgit.FreeBSD.org/src/commit/?id=99ec65e7fe61e3148dde543ed7d6566fe589a565
commit 99ec65e7fe61e3148dde543ed7d6566fe589a565
Author: Juraj Lutter <otis@FreeBSD.org>
AuthorDate: 2024-11-11 22:39:00 +0000
Commit: Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2025-06-08 15:21:24 +0000
traceroute6(8): Stop probing on networks rejected.
Stop probing after receiving ICMP6_DST_UNREACH and print
ICMP6 error code.
The behavior can be observed by tracing the route to,
for example, 2a02:ee80:4028:1126::
Discussed with: Job Snijders, Nick Hilliard
Obtained from: OpenBSD
Reviewed by: markj, jlduran
Differential Revision: https://reviews.freebsd.org/D47520
---
usr.sbin/traceroute6/traceroute6.8 | 6 ++++--
usr.sbin/traceroute6/traceroute6.c | 4 ++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/usr.sbin/traceroute6/traceroute6.8 b/usr.sbin/traceroute6/traceroute6.8
index f185b8087411..406a96a04424 100644
--- a/usr.sbin/traceroute6/traceroute6.8
+++ b/usr.sbin/traceroute6/traceroute6.8
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 2, 2024
+.Dd November 12, 2024
.Dt TRACEROUTE6 8
.Os
.\"
@@ -75,7 +75,7 @@
.Sh DESCRIPTION
The
.Nm
-utility uses the IPv6 protocol hop limit field to elicit an ICMPv6
+utility uses the IPv6 protocol hop limit field to elicit an ICMP6
TIME_EXCEEDED response from each gateway along the path to some host.
.Pp
The only mandatory parameter is the destination host name or IPv6 address.
@@ -191,6 +191,8 @@ Destination Unreachable - Not a Neighbour.
Destination Unreachable - Address Unreachable.
.It !H
Parameter Problem - Unrecognized Next Header Type.
+.It !<num>
+ICMP6 unreachable code <num>.
.It !\&
This is printed if the hop limit is <= 1 on a port unreachable message.
This means that the packet got to the destination, but that the reply had a hop
diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c
index bfa840b3b1c2..173e97c13bb3 100644
--- a/usr.sbin/traceroute6/traceroute6.c
+++ b/usr.sbin/traceroute6/traceroute6.c
@@ -1009,6 +1009,10 @@ main(int argc, char *argv[])
printf(" !");
++got_there;
break;
+ default:
+ ++unreachable;
+ printf(" !<%d>", code & 0xff);
+ break;
}
} else if (type == ICMP6_PARAM_PROB &&
code == ICMP6_PARAMPROB_NEXTHEADER) {