diff options
| author | Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> | 2026-02-22 16:35:23 +0000 |
|---|---|---|
| committer | Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> | 2026-02-26 09:48:09 +0000 |
| commit | 2f7cfeebcc4356d3bb85e953900ba5d3f75831ff (patch) | |
| tree | 586401f4b7410149e9dc0acb271f27260ed2a90f | |
| parent | ff6d1faa65a1a77d04746b43023feb457cfa27b8 (diff) | |
netstat(1): Fix expire column in -r flag using netlink
Reviewed by: glebius
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D55440
| -rw-r--r-- | usr.bin/netstat/route_netlink.c | 5 |
1 files 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); |
