From ed81a2a040a9af811b098cbb8cf026afd698bdbe Mon Sep 17 00:00:00 2001 From: Ido Schimmel Date: Thu, 16 Jan 2020 20:43:48 +0200 Subject: [PATCH 1/1] 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 Signed-off-by: David Ahern --- ip/iproute.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.39.5