From: Ido Schimmel Date: Thu, 19 Nov 2020 13:57:30 +0000 (+0200) Subject: ip route: Print "trap" nexthop indication X-Git-Tag: v5.11.0~32^2~26^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3de35f41be3f4136a90d38f8f1e3f1016f334d02;p=thirdparty%2Fiproute2.git ip route: Print "trap" nexthop indication The kernel can now signal that a nexthop is trapping packets instead of forwarding them. Print the flag to help users understand the offload state of each nexthop. Signed-off-by: Ido Schimmel Signed-off-by: David Ahern --- diff --git a/ip/iproute.c b/ip/iproute.c index 05ec2c296..ebb5f160f 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -362,6 +362,8 @@ void print_rt_flags(FILE *fp, unsigned int flags) print_string(PRINT_ANY, NULL, "%s ", "pervasive"); if (flags & RTNH_F_OFFLOAD) print_string(PRINT_ANY, NULL, "%s ", "offload"); + if (flags & RTNH_F_TRAP) + print_string(PRINT_ANY, NULL, "%s ", "trap"); if (flags & RTM_F_NOTIFY) print_string(PRINT_ANY, NULL, "%s ", "notify"); if (flags & RTNH_F_LINKDOWN)