Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Apr 2026 15:57:43 +0000
From:      Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 759d8a13a3b4 - main - route(8): Show weight of nexthop in multipath routes
Message-ID:  <69cd4077.3a9a8.322f5eed@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by pouria:

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

commit 759d8a13a3b4510b7fab4d6c32e5a8de5ab056e7
Author:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
AuthorDate: 2026-03-31 19:50:51 +0000
Commit:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-04-01 15:56:19 +0000

    route(8): Show weight of nexthop in multipath routes
    
    Reviewed by: zlei, markj
    Differential Revision: https://reviews.freebsd.org/D56202
---
 sbin/route/route_netlink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c
index e3ddbf81e62c..01817dcbb850 100644
--- a/sbin/route/route_netlink.c
+++ b/sbin/route/route_netlink.c
@@ -472,7 +472,7 @@ static void
 print_nlmsg_route_nhop(struct nl_helper *h, struct snl_parsed_route *r,
     struct rta_mpath_nh *nh, bool first)
 {
-	// gw 10.0.0.1 ifp vtnet0 mtu 1500 table inet.0
+	// gw 10.0.0.1 iface vtnet0 weight 100 mtu 1500 expire 3600 table inet.0
 	if (nh->gw != NULL) {
 		char gwbuf[128];
 		print_prefix(h, gwbuf, sizeof(gwbuf), nh->gw, -1);
@@ -486,6 +486,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("weight %d ", nh->rtnh_weight);
 		if (nh->rtax_mtu != 0)
 			printf("mtu %d ", nh->rtax_mtu);
 		if (nh->rta_expire > 0)


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69cd4077.3a9a8.322f5eed>