git: f15b8a8f1de1 - main - route(8): Show metric value in monitor route

From: Pouria Mousavizadeh Tehrani <pouria_at_FreeBSD.org>
Date: Wed, 20 May 2026 20:58:51 UTC
The branch main has been updated by pouria:

URL: https://cgit.FreeBSD.org/src/commit/?id=f15b8a8f1de1c1d879afe9296eb3d998c64469c6

commit f15b8a8f1de1c1d879afe9296eb3d998c64469c6
Author:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
AuthorDate: 2026-05-04 17:59:15 +0000
Commit:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-05-20 20:55:07 +0000

    route(8): Show metric value in monitor route
    
    Reviewed by:    glebius
    Differential Revision: https://reviews.freebsd.org/D56326
---
 sbin/route/route_netlink.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c
index eef8c2cfef18..20c82c25f5cf 100644
--- a/sbin/route/route_netlink.c
+++ b/sbin/route/route_netlink.c
@@ -542,6 +542,7 @@ print_nlmsg_route_nhop(struct nl_helper *h, struct snl_parsed_route *r,
 		if (nh->rtax_mtu == 0)
 			nh->rtax_mtu = link.ifla_mtu;
 		printf("iface %s ", link.ifla_ifname);
+		printf("metric %d ", nh->rta_metric);
 		printf("weight %d ", nh->rtnh_weight);
 		if (nh->rtax_mtu != 0)
 			printf("mtu %d ", nh->rtax_mtu);