diff options
author | Ido Schimmel <idosch@mellanox.com> | 2020-01-16 20:43:48 +0200 |
---|---|---|
committer | David Ahern <dsahern@gmail.com> | 2020-01-18 21:40:20 +0000 |
commit | ed81a2a040a9af811b098cbb8cf026afd698bdbe (patch) | |
tree | 54896c64939e7a7315cd608a03602687b123f20b /ip | |
parent | 8b802d20e41db92a56497a4897f487aca0396718 (diff) |
ip route: Print "rt_offload" and "rt_trap" indication
The kernel now signals the offload state of a route using the
'RTM_F_OFFLOAD' and 'RTM_F_TRAP' flags. Print these to help users
understand the offload state of each route. The "rt_" prefix is used in
order to distinguish it from the offload state of nexthops.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Diffstat (limited to 'ip')
-rw-r--r-- | ip/iproute.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ip/iproute.c b/ip/iproute.c index 32bb52df..93b805c9 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -368,6 +368,10 @@ void print_rt_flags(FILE *fp, unsigned int flags) print_string(PRINT_ANY, NULL, "%s ", "linkdown"); if (flags & RTNH_F_UNRESOLVED) print_string(PRINT_ANY, NULL, "%s ", "unresolved"); + if (flags & RTM_F_OFFLOAD) + print_string(PRINT_ANY, NULL, "%s ", "rt_offload"); + if (flags & RTM_F_TRAP) + print_string(PRINT_ANY, NULL, "%s ", "rt_trap"); close_json_array(PRINT_JSON, NULL); } |