git: 209905ec384e - main - ndp: Fix libxo formatting for the header of neighbor cache
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Sep 2024 10:15:56 UTC
The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=209905ec384eedd58f1b9b7ab774029d22787dfb commit 209905ec384eedd58f1b9b7ab774029d22787dfb Author: Helge Oldach <freebsd@oldach.net> AuthorDate: 2024-09-02 10:12:43 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-09-02 10:15:15 +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 --- 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 637aac2823ed..7c7bc60451c8 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -633,7 +633,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 e18d64175619..bafa9f2a143d 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"); }