From: Amit Cohen Date: Tue, 9 Feb 2021 09:12:00 +0000 (+0200) Subject: ip route: Print "rt_offload_failed" indication X-Git-Tag: v5.12.0~26^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33e2471e8f47a532123ee2642e97b6a425ac84ac;p=thirdparty%2Fiproute2.git ip route: Print "rt_offload_failed" indication The kernel signals when offload fails using the 'RTM_F_OFFLOAD_FAILED' flag. Print it to help users understand the offload state of the route. The "rt_" prefix is used in order to distinguish it from the offload state of nexthops, similar to "rt_offload" and "rt_trap". Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: David Ahern --- diff --git a/ip/iproute.c b/ip/iproute.c index ebb5f160f..a8c4886ba 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -374,6 +374,8 @@ void print_rt_flags(FILE *fp, unsigned int flags) print_string(PRINT_ANY, NULL, "%s ", "rt_offload"); if (flags & RTM_F_TRAP) print_string(PRINT_ANY, NULL, "%s ", "rt_trap"); + if (flags & RTM_F_OFFLOAD_FAILED) + print_string(PRINT_ANY, NULL, "%s ", "rt_offload_failed"); close_json_array(PRINT_JSON, NULL); }