Message ID | 20210930113844.1829373-12-razor@blackwall.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 5d5dc549ce7d0db0b34f0ecc3a96871c3806fb83 |
Delegated to: | David Ahern |
Headers | show |
Series | ip: nexthop: cache nexthops and print routes' nh info | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
diff --git a/ip/iproute.c b/ip/iproute.c index 3c933df4dd29..8532b5ce315e 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -28,6 +28,7 @@ #include "rt_names.h" #include "utils.h" #include "ip_common.h" +#include "nh_common.h" #ifndef RTAX_RTTVAR #define RTAX_RTTVAR RTAX_HOPS @@ -968,6 +969,10 @@ int print_route(struct nlmsghdr *n, void *arg) propagate ? "enabled" : "disabled"); } + if (tb[RTA_NH_ID] && show_details) + print_cache_nexthop_id(fp, "\n\tnh_info ", "nh_info", + rta_getattr_u32(tb[RTA_NH_ID])); + if (tb[RTA_MULTIPATH]) print_rta_multipath(fp, r, tb[RTA_MULTIPATH]);