]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
ip route: Print "trap" nexthop indication
authorIdo Schimmel <idosch@nvidia.com>
Thu, 19 Nov 2020 13:57:30 +0000 (15:57 +0200)
committerDavid Ahern <dsahern@gmail.com>
Sun, 22 Nov 2020 19:42:20 +0000 (12:42 -0700)
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>
ip/iproute.c

index 05ec2c296579f162a6f5a553e1ee0037c4104221..ebb5f160fc4437b9e0f15af3a307425b0f701483 100644 (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)