From nobody Sun Jun 8 15:22:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bFf2342jvz5xgX5; Sun, 08 Jun 2025 15:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bFf232Sk7z3LPx; Sun, 08 Jun 2025 15:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749396171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IvxDRHJzxEgXzHbqn6UPxd5ckBW8u7XYce/KxySips=; b=dccSAO/syV6IFCVUxRpokFezFrPRkuST8QtCB8/lsF8uId6Zu4oBZNMQokJ9efhOIwbPBc B+WXhAZtHt2yLwIMXu4BNKVZ6z+kuHpG5FTXPqTQ5tam2otavSjOmJU9WYiVTB7+8i3LHb EWlIXSLGMqYMZjUY1Q8Wd7WUI1P26cv01chpHfqFX7o8mP7XRoK+UJULyAc1sGNlJlO2uc MhOEmKPYCg47OQFA6UjWhWnZmDD1XcWwxrWTEEzXCxCQd2U2/uw7BulWQM5cTPgKiqyOnr Rp2LIv/1BdS7ijGrqWUFSrBXyTeFhH/SNGluGKpUB+UJJubjuVvCGk9ynW5O+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749396171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IvxDRHJzxEgXzHbqn6UPxd5ckBW8u7XYce/KxySips=; b=sJiIh8LQTvp4WgeajuJh+ua95kmoCsg13vBytBVHzjle7oNTmaS+NDxuoj8LtZX4QdN1hG GQIich1i63F+T94Dz+QMPym9JIGNtNcKm5+zRQtvWbI/ULyCjTB3oYhYZHRNnouIv+oVbD WUFM5s3wXnbE56bGc5e4ye/GnMPqR0Hmzfl4JwwqFAZKSUcK9U6wHDj4U9E5rvUPf8W8IB +xxiJvhXrZTZViIyYc9iG5YS1ROSWC5n7Y5xvXKKKI0IMH3eJQjYpSCAPA2elyQ7IOyjME Ys+AGd2J+1q13IOTY6+D1RO0pLvL6T+TvJTWb0CCzX+W3QYbG+mOnOtjVeypIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749396171; a=rsa-sha256; cv=none; b=SLlegEJuAOm0qI0I4Y0f3xUMu/3UTQG1m1mUMAVp2rihSduNe2L1TC2EGBSHp8SrbqECKo UJM4o0UWGjocLhXvCYU5C/uILuXTxOmTV9YgB5IJ6ufZErrRY8awGx1FyP00e7cIrMek5R +aASe+4oYxtWRcuQhH1xVIvV4/V2IAzXuP54C9chZ3F4dxf8nnDQJsxmQoeG2Q5zHv8kS3 FC03inkqQq6390+iyGym/ywAoI5PWFpmuWwkPrtKHFnBF/0wpI7hIiSXSxE9n9YJDgbVVv n0ZE+VgdjycrwmmR4truvovNswgziLUyeyU1XAKF+5AI/HRlGRtrv9PDgMEc5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bFf23249Gz197; Sun, 08 Jun 2025 15:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 558FMpuf051265; Sun, 8 Jun 2025 15:22:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 558FMpsA051262; Sun, 8 Jun 2025 15:22:51 GMT (envelope-from git) Date: Sun, 8 Jun 2025 15:22:51 GMT Message-Id: <202506081522.558FMpsA051262@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Juraj Lutter Subject: git: 99ec65e7fe61 - main - traceroute6(8): Stop probing on networks rejected. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: otis X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99ec65e7fe61e3148dde543ed7d6566fe589a565 Auto-Submitted: auto-generated The branch main has been updated by otis: URL: https://cgit.FreeBSD.org/src/commit/?id=99ec65e7fe61e3148dde543ed7d6566fe589a565 commit 99ec65e7fe61e3148dde543ed7d6566fe589a565 Author: Juraj Lutter AuthorDate: 2024-11-11 22:39:00 +0000 Commit: Juraj Lutter 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 ! +ICMP6 unreachable code . .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) {