From nobody Tue Sep 10 10:02:49 2024 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 4X2zls2wnfz5VJ4v; Tue, 10 Sep 2024 10:02:49 +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 4X2zls23Nrz4fPr; Tue, 10 Sep 2024 10:02:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725962569; 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=IsKGLtQ1aKIdGwrywZ5swsm4M9I7gGaguZ8NR8wZ2V0=; b=WagDQD8IWj1e/6Un+ly68YM154uZpm2tXswYqbd53fUbmSIsJSviDd6BSNSwOJbHNSQfZU Gi7cTtNpqyeCF4Bsg6NQYbntWJ6DHRBY1wEJOGgH3auiIPn5IZQkkGf4+XGW/QM8+/T4fd d5RLtYo4VHrSIARRMEESapZ9HjDXkEObz/HJlhcDzr3F32R2Hu0LaAs6OnL67VEFfA7V6B Tn/QM/OAwJXV7iCpkAgnofOAPLDXpciARSym3kKd2DcibWNc5G5zeioVmzY3h70ZqyazFh yRqS0ONlK60Y9mPk13jvYCUUAb/nLFr1bgtgVpNjNEB41C5gwS0zyF5iHGOlEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725962569; a=rsa-sha256; cv=none; b=uxSJxMap3Lpn+AKM3GSuKPEMzbhReBqfNNaNgGPHCJwueqDEK/fwsxGSsWPSxdTIhu3Hye QMXLYwn0C4yph5h5I0bNaMV7XBHE/twAlnAWbnA1AM3ygqWq+Rbh/KQkj42PWc6bBonzn4 qIkU2k7I/TH/K6Fd9xbuqgOY9K5wPKbwBM16wTzZnJeLO7bCh5OqTQPk2wiwgperUiLEoF aSArZwwfypCWYm8HPM/j4Fb9y6e2ueQQi1AnGtmSrOnph/Qd9xK9afdaYan1hLDnBPYhJ8 z5HKiIQiKFz7/UpHXqj1NTzqTU53Hija5Yxyr9chCHfV5KZ5JD1uV0L+1KwOTQ== 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=1725962569; 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=IsKGLtQ1aKIdGwrywZ5swsm4M9I7gGaguZ8NR8wZ2V0=; b=E4U5iXgcZj1TC6uzVE/OVLdYgsoUp6RNYIK78XoqjjLpJDzGKaiac7gtaX815/B3zIkSCB tiZQuHUb6Ea2VQzsU5r4rpB9ZnEPZeRjRw8yJMFVqMTCfDQf+WnEgdJrvopkioy6kLzou7 8JXnaJUMBUPmjM8OnHzIUMLGAHcZ3951tEJTu1Z245RUQbsahCtj+7ZyNlERr8E3cNfcr7 8cbq/mZd4a6pAyh3vHb6tHmgHJb5Xy4axN3il9R0tpZseDN6ubg35E+ri3LCFMF7DiQYmw M+PUZj+qvLk8PmdPcixijzAom+6IZIJi8gRpPvU8yqvci813Y1IMkc8vfWEuuw== 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 4X2zls1fvWzjPy; Tue, 10 Sep 2024 10:02:49 +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 48AA2nIM083591; Tue, 10 Sep 2024 10:02:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48AA2nGS083588; Tue, 10 Sep 2024 10:02:49 GMT (envelope-from git) Date: Tue, 10 Sep 2024 10:02:49 GMT Message-Id: <202409101002.48AA2nGS083588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 07cf1ce012c5 - stable/14 - ndp: Fix libxo formatting for the header of neighbor cache List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 07cf1ce012c51e30ef5078c23a7d68a9b5d87c0a Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=07cf1ce012c51e30ef5078c23a7d68a9b5d87c0a commit 07cf1ce012c51e30ef5078c23a7d68a9b5d87c0a Author: Helge Oldach AuthorDate: 2024-09-02 10:12:43 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-10 10:01:49 +0000 ndp: Fix libxo formatting for the header of neighbor cache PR: 272749 Reviewed by: zlei Fixes: e1c7783e220b ndp(8): add structured output formatting via libxo Fixes: 91fbe0819bb9 ndp: convert ndp(8) to netlink MFC after: 3 days (cherry picked from commit 209905ec384eedd58f1b9b7ab774029d22787dfb) --- usr.sbin/ndp/ndp.c | 2 +- usr.sbin/ndp/ndp_netlink.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 56c86e447cd5..a6f30911ddb4 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -634,7 +634,7 @@ dump_rtsock(struct sockaddr_in6 *addr, int cflag) if (!opts.tflag && !cflag) { char xobuf[200]; snprintf(xobuf, sizeof(xobuf), - "{T:/%%-%d.%ds} {T:/%%-%d.%ds} {T:/%%%d.%ds} {T:/%%-9.9s} {T:%%1s} {T:%%5s}\n", + "{T:/%%-%d.%ds} {T:/%%-%d.%ds} {T:/%%%d.%ds} {T:/%%-9.9s} {T:/%%1s} {T:/%%5s}\n", W_ADDR, W_ADDR, W_LL, W_LL, W_IF, W_IF); xo_emit(xobuf, "Neighbor", "Linklayer Address", "Netif", "Expire", "S", "Flags"); } diff --git a/usr.sbin/ndp/ndp_netlink.c b/usr.sbin/ndp/ndp_netlink.c index 79bdec2356d0..179d715c8ded 100644 --- a/usr.sbin/ndp/ndp_netlink.c +++ b/usr.sbin/ndp/ndp_netlink.c @@ -341,7 +341,7 @@ print_entries_nl(uint32_t ifindex, struct sockaddr_in6 *addr, bool cflag) if (!opts.tflag && !cflag) { char xobuf[200]; snprintf(xobuf, sizeof(xobuf), - "{T:/%%-%d.%ds} {T:/%%-%d.%ds} {T:/%%%d.%ds} {T:/%%-9.9s} {T:%%1s} {T:%%5s}\n", + "{T:/%%-%d.%ds} {T:/%%-%d.%ds} {T:/%%%d.%ds} {T:/%%-9.9s} {T:/%%1s} {T:/%%5s}\n", W_ADDR, W_ADDR, W_LL, W_LL, W_IF, W_IF); xo_emit(xobuf, "Neighbor", "Linklayer Address", "Netif", "Expire", "S", "Flags"); }