diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2011-10-06 22:48:49 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2011-10-06 22:48:49 +0200 |
commit | 32f95476a8d60508ca9d24fe20b09899b72de9d7 (patch) | |
tree | 84c2084a43f5c76e5feff07a3b8cafb521d067f1 /nest | |
parent | 35c875f0d1eb7c72e0b0ab8a90eb32cbcbfdac02 (diff) | |
download | bird-32f95476a8d60508ca9d24fe20b09899b72de9d7.tar bird-32f95476a8d60508ca9d24fe20b09899b72de9d7.zip |
Signal problems with route installation to kernel tables.
Diffstat (limited to 'nest')
-rw-r--r-- | nest/route.h | 4 | ||||
-rw-r--r-- | nest/rt-table.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/nest/route.h b/nest/route.h index 641b924..a4c0154 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 3ff53ff..e20d2f6 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) |