From: Roopa Prabhu <redacted>
RTNH_F_EXTERNAL is printed as "offload" in iproute2 output.
This patch renames the flag to be consistent with what the user sees.
Signed-off-by: Roopa Prabhu <redacted>
---
RTNH_F_EXTERNAL was introduced in 4.1 and is not out in 4.0 kernel.
This patch follows kernel patch with the same title
"rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD"
include/linux/rtnetlink.h | 2 +-
ip/iproute.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 702b19b..90eeb4f 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -337,7 +337,7 @@ struct rtnexthop {
#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */
#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */
#define RTNH_F_ONLINK 4 /* Gateway is forced on link */
-#define RTNH_F_EXTERNAL 8 /* Route installed externally */
+#define RTNH_F_OFFLOAD 8 /* Offloaded route */
/* Macros to handle hexthops */
diff --git a/ip/iproute.c b/ip/iproute.c
index 670a4c6..262d3a1 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -447,7 +447,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
fprintf(fp, "onlink ");
if (r->rtm_flags & RTNH_F_PERVASIVE)
fprintf(fp, "pervasive ");
- if (r->rtm_flags & RTNH_F_EXTERNAL)
+ if (r->rtm_flags & RTNH_F_OFFLOAD)
fprintf(fp, "offload ");
if (r->rtm_flags & RTM_F_NOTIFY)
fprintf(fp, "notify ");
--
1.7.10.4