From nobody Mon Feb 16 19:47:28 2026 X-Original-To: dev-commits-src-branches@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 4fFCwd2qqvz6SFlK for ; Mon, 16 Feb 2026 19:47:29 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fFCwd0nJxz3p4L for ; Mon, 16 Feb 2026 19:47:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771271249; 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=qVOacOHjZnswprm32Orf6IQqCWTcIxdczAkFeHAcjUY=; b=KpinMTNSXU4q6rYyZqKb3vi4Drgoq40fGtAumGxG7uyLOwVt7yrP55b2YC+if2dmNf+0N0 07HJy7eCmqqTOyXW+XiztaVI1En/ZQmq1e/CbUXiXMlkpzpoX/EMt2uf4jS6jyRFplGQeZ VFyrlNOJDBY0zmnAgprKxoP9x5DotdJsIvbnHg4Z6pzzM4agtCKoNlEYjLuXD7e1YZZWwp E5io6B86jz7Q6yLHHq+vaGpJRamNqe8Vr9XPekVGr1A0gnMnnJMJLhM9IavcIvJOQfsd8r zr3BcnZBk6rn1MwmozpmWx5X7zsqP4bH49LE1fAXtHcJYkP6PkLDNPwKQymffQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771271249; a=rsa-sha256; cv=none; b=JfCdsfYJ5VGJx9SvISuIOu5VcWHKLCo22Y3QRaFeAl65yRmnc9n//qseXa5gJojfeOiGuJ WDlZ1EPxrAvAZoziy+u6+CTnWtLk9rdAsa8OL/7GTCiS/y61O8Chz4CizQ8Xiu3rSxdSPj ojEXq0tOcaRFwmikRzRVg9BdBh9u/xVpt7QUS5bRRvk7a95ZZa1PglIsnazEESkNC4aeTe kfdlP4gU3XudL9LTVgjWZx99/H9E5lVhEV6HPwhCIpKdg+EbDcOg8/8E7H5JPLoXBcc+yV IPLJ1Qd3zArs68Mw1q7w0MsoNkwBjxeicQJanX3UgPHrsBytvcafOu1oZLnURA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771271249; 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=qVOacOHjZnswprm32Orf6IQqCWTcIxdczAkFeHAcjUY=; b=W1dLQUQlQYmMajKGo9tZB6Vc3HZ4f3t3PSFgBTnfdod0LBreupitpF3zB2BXULQc6DrwwH obV4pi5yjTEvppw1q1KagueGNbLJvdbk2pFGz5WL9echir3MNia2VUudMGY/i66FuL9Rws dKYqLiuerrOK1SFe39hqyE/hgE6347K4QomMupFJlB9KTgEwpCds3tjUOLrv0VKlRACPds 2pz/FllUqnxlxSwJ1mEuEQnu7tWu0G8CmEmu4zgaIzbeaSi/bMzLeglwbsWfaNuGIYqhCu UEXVtKJAHyloLa77cTgBlDoG9dDzgfqud2Zn4u8Td9pNRNJVhr3bPgrlW/X/Lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fFCwd03dnzdlH for ; Mon, 16 Feb 2026 19:47:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40d78 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 16 Feb 2026 19:47:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 49dbd7670300 - stable/14 - netstat: Fix whitespace in libxo output for multicast routes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49dbd7670300e015a217ffb00a3110db5ef28c7d Auto-Submitted: auto-generated Date: Mon, 16 Feb 2026 19:47:28 +0000 Message-Id: <69937450.40d78.37ad6354@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=49dbd7670300e015a217ffb00a3110db5ef28c7d commit 49dbd7670300e015a217ffb00a3110db5ef28c7d Author: Mark Johnston AuthorDate: 2026-01-30 20:30:58 +0000 Commit: Mark Johnston CommitDate: 2026-02-16 16:09:28 +0000 netstat: Fix whitespace in libxo output for multicast routes Also fix some bogus libxo format strings in mroute6.c, and close a couple of lists instead of opening them twice. Fixes: ade9ccfe211a ("Convert netstat to use libxo.") MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. (cherry picked from commit 34c3e1d718a86436f863b2ae8b91bcf406b37f0e) (cherry picked from commit d2b595debaf2ff82a402c9226a77cd43cc97bb50) --- usr.bin/netstat/mroute.c | 11 +++++------ usr.bin/netstat/mroute6.c | 13 ++++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/usr.bin/netstat/mroute.c b/usr.bin/netstat/mroute.c index a5da29e89009..84db9022e43b 100644 --- a/usr.bin/netstat/mroute.c +++ b/usr.bin/netstat/mroute.c @@ -39,7 +39,6 @@ * @(#)mroute.c 8.2 (Berkeley) 4/28/95 */ -#include /* * Print multicast routing structures and statistics. * @@ -160,7 +159,7 @@ print_bw_meter(struct bw_meter *bw_meter, int *banner_printed) } xo_emit(" {:remaining-time/%s}", s3); - xo_open_instance("bandwidth-meter"); + xo_close_instance("bandwidth-meter"); xo_emit("\n"); } @@ -189,9 +188,9 @@ print_mfc(struct mfc *m, int maxvif, int *banner_printed) } memcpy(&sin.sin_addr, &m->mfc_origin, sizeof(sin.sin_addr)); - xo_emit(" {:origin-address/%-15.15s}", routename(sa, numeric_addr)); + xo_emit(" {t:origin-address/%-*.15s}", 15, routename(sa, numeric_addr)); memcpy(&sin.sin_addr, &m->mfc_mcastgrp, sizeof(sin.sin_addr)); - xo_emit(" {:group-address/%-15.15s}", + xo_emit(" {t:group-address/%-15.15s}", routename(sa, numeric_addr)); xo_emit(" {:sent-packets/%9lu}", m->mfc_pkt_cnt); xo_emit(" {:parent/%3d} ", m->mfc_parent); @@ -306,12 +305,12 @@ mroutepr(void) xo_open_instance("vif"); memcpy(&sin.sin_addr, &v->v_lcl_addr, sizeof(sin.sin_addr)); - xo_emit(" {:vif/%2u} {:threshold/%6u} {:route/%-15.15s}", + xo_emit(" {:vif/%2u} {:threshold/%6u} {t:route/%-15.15s}", /* opposite math of add_vif() */ vifi, v->v_threshold, routename(sa, numeric_addr)); memcpy(&sin.sin_addr, &v->v_rmt_addr, sizeof(sin.sin_addr)); - xo_emit(" {:source/%-15.15s}", (v->v_flags & VIFF_TUNNEL) ? + xo_emit(" {t:source/%-15.15s}", (v->v_flags & VIFF_TUNNEL) ? routename(sa, numeric_addr) : ""); xo_emit(" {:received-packets/%9lu} {:sent-packets/%9lu}\n", diff --git a/usr.bin/netstat/mroute6.c b/usr.bin/netstat/mroute6.c index 5873c1ee85c6..0b9438dee2a3 100644 --- a/usr.bin/netstat/mroute6.c +++ b/usr.bin/netstat/mroute6.c @@ -67,7 +67,6 @@ * @(#)mroute.c 8.2 (Berkeley) 4/28/95 */ -#include #ifdef INET6 #include #include @@ -155,7 +154,7 @@ mroute6pr(void) xo_close_instance("multicast-interface"); } if (banner_printed) - xo_open_list("multicast-interface"); + xo_close_list("multicast-interface"); else xo_emit("\n{T:IPv6 Multicast Interface Table is empty}\n"); @@ -176,19 +175,19 @@ mroute6pr(void) xo_open_list("multicast-forwarding-cache"); xo_emit("\n" "{T:IPv6 Multicast Forwarding Cache}\n"); - xo_emit(" {T:%-*.*s} {T:%-*.*s} {T:%s}", + xo_emit(" {T:/%-*.*s} {T:/%-*.*s} {T:/%s}\n", WID_ORG, WID_ORG, "Origin", WID_GRP, WID_GRP, "Group", - " Packets Waits In-Mif Out-Mifs\n"); + " Packets Waits In-Mif Out-Mifs"); banner_printed = 1; } xo_open_instance("multicast-forwarding-cache"); - xo_emit(" {:origin/%-*.*s}", WID_ORG, WID_ORG, + xo_emit(" {t:origin/%-*.*s}", WID_ORG, WID_ORG, routename(sin6tosa(&mfc.mf6c_origin), numeric_addr)); - xo_emit(" {:group/%-*.*s}", WID_GRP, WID_GRP, + xo_emit(" {t:group/%-*.*s}", WID_GRP, WID_GRP, routename(sin6tosa(&mfc.mf6c_mcastgrp), numeric_addr)); xo_emit(" {:total-packets/%9ju}", @@ -209,7 +208,7 @@ mroute6pr(void) xo_open_list("mif"); for (mifi = 0; mifi <= maxmif; mifi++) { if (IF_ISSET(mifi, &mfc.mf6c_ifset)) - xo_emit(" {l:%u}", mifi); + xo_emit(" {l:/%u}", mifi); } xo_close_list("mif"); xo_emit("\n");