From nobody Tue Nov 17 20:39:39 2026 X-Original-To: dev-commits-src-all@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 4jTc6M3HfKz71qGh for ; Tue, 17 Nov 2026 20:39:39 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jTc6M1gnkz3R77 for ; Tue, 17 Nov 2026 20:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794947979; 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=gKtE6AGIM0Z1saggS5bgZ/4b//gdbczgLxj6ym+H2dY=; b=bJVwNMjsIrs+fASpDVwTbVnTuzibCg5SyOmdT4tCGFHW97Htx8dAzcz+oexuthb2KQoKw4 sSJePCuIgV9DizqZaCr6aoCXr9ZDd7xjvduvbsereyIkk513e8m/+nqlUa8cg34+tNsI6h q1iN9mz9gB3R9tTYq3QV72A/CT+d0PZ2VhkftE0BpmqA9+fAG/5SOsYcyFAWg+LvyuBtqh 5S4MRZY0Ta+XmfrjWbS2odKh4EsG856pBdbtZvA+jrGnYJTs+S5ikgXTWwWd6yC4BVSK8/ M7NjqOQHzfjz1rZeH+BqoQz07Qh6HSXF1KclSvJrxN5lNNTc5/H2cba+KdeAsw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794947979; b=pQ3ZphDFtbk3pZFbQLU5Wr5ONxNumh1tJBtbfovki9HG7sjd9VI+qvCwdXMIpeD7jfpqnw wQrMPGvGDKmmf72nFEadYmORWsosXQbbxF039WEcZx+hMQB/cmcZ7vP40A5Bzi5DOBs7nC Iph6gtBbQ8/6Vrt+4BLiDNSTobnw31+8uPA4uSiGwFOPiwR7v5wpK2/dQHBtv3x1E1yZkX mo1d4QIzvZe/i9slIbj4tuyJhj8ffbaP/JStWDPWuvYNx3r2AgoR8MgSeh6ZcRhXQo4BjX X9F3LIsQCF+1lXfpv7YTJOfCwAQ+drDOwJKXEOrmkssEU/7RSgpOyfFB55w4IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794947979; 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=gKtE6AGIM0Z1saggS5bgZ/4b//gdbczgLxj6ym+H2dY=; b=mwVlcxOWJmRLUETKrAUQnDnTsU9c1JIQxzvE32qOnHFVfF6b102WonVozVZSryOK8FX61o 6tQKmucNJ/J8VuBCI7EZpA8Lg8uXxLIGi+UzzFTlPG6TJGct2v9T6OkeZw8BtNeNLm0RoF 8jNAbTa5fdJMVcyFaAnRv4svj5wFe4MHdUohULnKDldXa8hGbeIVffvaFv0UnYmUSImHhE tcWcG1Nt9w+TVGc8olDlLwW1CreboVMQjipN7drhZF/ejN+hPfulp7P127S5RKRtDmsztf CZYG+lFWNG15WlF7CeVxBVkL0edznJZS4GaGmT13GxmJwA8F+JuO31ja8tH7iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jTc6M135WzyXN for ; Tue, 17 Nov 2026 20:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 15f88 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 17 Nov 2026 20:39:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: 098eea00500e - main - traceroute6: do not print an ECN report for an echo reply List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 098eea00500eaf1f2e495cac3d43c393ecbcb15a Auto-Submitted: auto-generated Date: Tue, 17 Nov 2026 20:39:39 +0000 Message-Id: <6afcbb8b.15f88.bc93a9e@gitrepo.freebsd.org> The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=098eea00500eaf1f2e495cac3d43c393ecbcb15a commit 098eea00500eaf1f2e495cac3d43c393ecbcb15a Author: Maxim Konovalov AuthorDate: 2026-11-16 00:34:34 +0000 Commit: Maxim Konovalov CommitDate: 2026-11-17 20:34:55 +0000 traceroute6: do not print an ECN report for an echo reply packet_ok() takes the ECN bits from the IPv6 header quoted by an ICMPv6 error message. The destination answers an ICMPv6 probe (-I) with an echo reply, which repeats the ICMPv6 data of the probe but not its IPv6 header, so for that reply the main loop used whatever an earlier packet had left in ecn. With -E the ECN report for the destination therefore repeated the bits quoted by an earlier ICMPv6 error. If no ICMPv6 error had been received before, because the destination is one hop away, the first hops are skipped with -f or the routers on the path are silent, ecn was still uninitialized: $ traceroute6 -E -I -n -q 1 ::1 traceroute6 to ::1 (::1) from ::1, 64 hops max, 20 byte packets 1 ::1 0.055 ms (ecn=bleached) Print the ECN report only when there is a quoted header. Document that there is no ECN report for an echo reply. Reviewed by: jlduran, Kevin Day Fixes: 0c2218d1d5fd ("traceroute6: Implement ECN bleaching detection") MFC after: 2 weeks Co-Authored-By: Claude Opus 5.5 Differential Revision: https://reviews.freebsd.org/D61607 --- usr.sbin/traceroute6/traceroute6.8 | 5 ++++- usr.sbin/traceroute6/traceroute6.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/usr.sbin/traceroute6/traceroute6.8 b/usr.sbin/traceroute6/traceroute6.8 index 7c6890d4de6a..2144364ab527 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 August 16, 2026 +.Dd November 15, 2026 .Dt TRACEROUTE6 8 .Os .\" @@ -109,6 +109,9 @@ or mangled them, or if it is experiencing congestion .Pq Dv 11 . Otherwise, report that it passed the bits appropriately. +The report is taken from the probe header quoted in the ICMPv6 error message +sent by the hop, so there is none for a destination which answers an ICMPv6 +probe with an echo reply. If .Fl t is also specified, the corresponding ECN bits will be replaced. diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c index 7b821c11db38..1bb3b982a705 100644 --- a/usr.sbin/traceroute6/traceroute6.c +++ b/usr.sbin/traceroute6/traceroute6.c @@ -975,7 +975,9 @@ main(int argc, char *argv[]) lastaddr = Rcv.sin6_addr; } printf(" %.3f ms", deltaT(&t1, &t2)); - if (ecnflag) { + /* An echo reply quotes no header. */ + if (ecnflag && + type != ICMP6_ECHO_REPLY) { switch (ecn) { case IPTOS_ECN_ECT1: printf(" (ecn=passed)");