diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-10-25 13:28:51 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-10-25 13:28:51 +0200 |
commit | 498d8145c0984acf6b39d7e312950315571e7030 (patch) | |
tree | 96d15b7f3ce272e36b9a7a23acb5e9dffa548646 /nest | |
parent | ec331acf48535211fb5b50c87e74bf1c8370283a (diff) |
Nest: Fix primary flag in show route
The route is changed by rte_make_tmp_attrs(), so we need to compare
net->routes to the original one.
Thanks to Kenth Eriksson for the bugreport.
Diffstat (limited to 'nest')
-rw-r--r-- | nest/rt-show.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nest/rt-show.c b/nest/rt-show.c index 002a6039..5114e5f0 100644 --- a/nest/rt-show.c +++ b/nest/rt-show.c @@ -29,12 +29,11 @@ rt_show_table(struct cli *c, struct rt_show_data *d) } static void -rt_show_rte(struct cli *c, byte *ia, rte *e, struct rt_show_data *d) +rt_show_rte(struct cli *c, byte *ia, rte *e, struct rt_show_data *d, int primary) { byte from[IPA_MAX_TEXT_LENGTH+8]; 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); void (*get_route_info)(struct rte *, byte *buf); struct nexthop *nh; @@ -167,7 +166,7 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d) goto skip; if (d->stats < 2) - rt_show_rte(c, ia, e, d); + rt_show_rte(c, ia, e, d, (e->net->routes == ee)); d->show_counter++; ia[0] = 0; |