summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/zclient.h7
-rw-r--r--zebra/rt_netlink.c3
-rw-r--r--zebra/zebra_vty.c3
3 files changed, 13 insertions, 0 deletions
diff --git a/lib/zclient.h b/lib/zclient.h
index fb5da9aad2..e6920d533f 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -540,6 +540,13 @@ struct zapi_route {
*/
#define ZEBRA_FLAG_OFFLOAD_FAILED 0x200
+/*
+ * This flag lets us know that we think the route entry
+ * received has caused us to be out of sync with the
+ * kernel (NLM_F_APPEND at the very least )
+ */
+#define ZEBRA_FLAG_OUTOFSYNC 0x400
+
/* The older XXX_MESSAGE flags live here */
uint32_t message;
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 3a8f5264f4..d02cc93f5f 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -803,6 +803,9 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id,
if (rtm->rtm_flags & RTM_F_OFFLOAD_FAILED)
flags |= ZEBRA_FLAG_OFFLOAD_FAILED;
+ if (h->nlmsg_flags & NLM_F_APPEND)
+ flags |= ZEBRA_FLAG_OUTOFSYNC;
+
/* Route which inserted by Zebra. */
if (selfroute) {
flags |= ZEBRA_FLAG_SELFROUTE;
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index f68a656710..6526cc1ae7 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -222,6 +222,9 @@ static char re_status_output_char(const struct route_entry *re,
&& CHECK_FLAG(re->flags, ZEBRA_FLAG_OFFLOAD_FAILED))
return 'o';
+ if (CHECK_FLAG(re->flags, ZEBRA_FLAG_OUTOFSYNC))
+ return 'd';
+
if (star_p)
return '*';
else