summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
Diffstat (limited to 'nest')
-rw-r--r--nest/route.h4
-rw-r--r--nest/rt-table.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/nest/route.h b/nest/route.h
index 641b9248..a4c01548 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -321,6 +321,10 @@ typedef struct rta {
#define RTD_MULTIPATH 5 /* Multipath route (nexthops != NULL) */
#define RTD_NONE 6 /* Invalid RTD */
+ /* Flags for net->n.flags, used by kernel syncer */
+#define KRF_INSTALLED 0x80 /* This route should be installed in the kernel */
+#define KRF_SYNC_ERROR 0x40 /* Error during kernel table synchronization */
+
#define RTAF_CACHED 1 /* This is a cached rta */
#define IGP_METRIC_UNKNOWN 0x80000000 /* Default igp_metric used when no other
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 3ff53ff4..e20d2f6d 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -1645,6 +1645,7 @@ rt_show_rte(struct cli *c, byte *ia, rte *e, struct rt_show_data *d, ea_list *tm
byte tm[TM_DATETIME_BUFFER_SIZE], info[256];
rta *a = e->attrs;
int primary = (e->net->routes == e);
+ int sync_error = (e->net->n.flags & KRF_SYNC_ERROR);
struct mpnh *nh;
rt_format_via(e, via);
@@ -1667,7 +1668,7 @@ rt_show_rte(struct cli *c, byte *ia, rte *e, struct rt_show_data *d, ea_list *tm
else
bsprintf(info, " (%d)", e->pref);
cli_printf(c, -1007, "%-18s %s [%s %s%s]%s%s", ia, via, a->proto->name,
- tm, from, primary ? " *" : "", info);
+ tm, from, primary ? (sync_error ? " !" : " *") : "", info);
for (nh = a->nexthops; nh; nh = nh->next)
cli_printf(c, -1007, "\tvia %I on %s weight %d", nh->gw, nh->iface->name, nh->weight + 1);
if (d->verbose)