git: 824f5e72176d - stable/15 - netstat(1): Fix expire column in -r flag using netlink
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 26 Mar 2026 11:20:47 UTC
The branch stable/15 has been updated by pouria:
URL: https://cgit.FreeBSD.org/src/commit/?id=824f5e72176d17fdfc14be0f2c6f752d7972471c
commit 824f5e72176d17fdfc14be0f2c6f752d7972471c
Author: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
AuthorDate: 2026-02-22 16:35:23 +0000
Commit: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-03-26 09:12:13 +0000
netstat(1): Fix expire column in -r flag using netlink
Reviewed by: glebius
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D55440
(cherry picked from commit 2f7cfeebcc4356d3bb85e953900ba5d3f75831ff)
---
usr.bin/netstat/route_netlink.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/usr.bin/netstat/route_netlink.c b/usr.bin/netstat/route_netlink.c
index e7b2a1964602..2c4b7a5c6b00 100644
--- a/usr.bin/netstat/route_netlink.c
+++ b/usr.bin/netstat/route_netlink.c
@@ -218,8 +218,8 @@ p_path(struct snl_parsed_route *rt, bool is_mpath)
else
xo_emit("{t:interface-name/%*.*s}", wid.iface, wid.iface,
prettyname);
- if (rt->rta_expires > 0) {
- xo_emit(" {:expire-time/%*u}", wid.expire, rt->rta_expires);
+ if (rt->rta_expire > 0) {
+ xo_emit(" {:expire-time/%*u}", wid.expire, rt->rta_expire);
}
}
@@ -244,6 +244,7 @@ p_rtentry_netlink(struct snl_state *ss, const char *name, struct nlmsghdr *hdr)
rt.rtax_weight = nhop->rtnh_weight;
rt.rta_rtflags = nhop->rta_rtflags ? nhop->rta_rtflags : orig_rtflags;
rt.rtax_mtu = nhop->rtax_mtu ? nhop->rtax_mtu : orig_mtu;
+ rt.rta_expire = nhop->rta_expire;
xo_open_instance(name);
p_path(&rt, true);