]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
iproute: Display offload indication per-nexthop
authorIdo Schimmel <idosch@mellanox.com>
Thu, 3 Aug 2017 06:13:55 +0000 (09:13 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 3 Aug 2017 23:13:16 +0000 (16:13 -0700)
Since kernel commit 475abbf1ef67 ("ipv4: fib: Set offload indication
according to nexthop flags") offload indication is reported on a
per-nexthop basis.

Adjust iproute2 to display it.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: David Ahern <dsahern@gmail.com>
ip/iproute.c

index cb695ad4141a7f7a8249c74371fb78ca66783cd5..39af38cf5e6d33b529c1ced5c0cd8a5fe3ea4a93 100644 (file)
@@ -696,6 +696,8 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
                                fprintf(fp, "onlink ");
                        if (nh->rtnh_flags & RTNH_F_PERVASIVE)
                                fprintf(fp, "pervasive ");
+                       if (nh->rtnh_flags & RTNH_F_OFFLOAD)
+                               fprintf(fp, "offload ");
                        if (nh->rtnh_flags & RTNH_F_LINKDOWN)
                                fprintf(fp, "linkdown ");
                        len -= NLMSG_ALIGN(nh->rtnh_len);