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 <idosch@nvidia.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
Ido Schimmel 2020-11-19 15:57:30 +02:00 committed by David Ahern
parent db8b149b16
commit 3de35f41be
1 changed files with 2 additions and 0 deletions

View File

@ -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)