diff options
author | Maria Matejka <mq@ucw.cz> | 2022-03-09 13:13:05 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-03-09 13:13:05 +0100 |
commit | 92b832380d31fc9995d6e45b3db4ce496fcb7837 (patch) | |
tree | d76415a8847aef820bb9c935a3906d670cfa7aed /proto/mrt/mrt.c | |
parent | 9b6db9f9b8e561d215e1df01169b15a9dfaba1b9 (diff) | |
parent | 1b9189d5fdab672f91600b7e72a1deeab277eafc (diff) |
Merge commit '1b9189d5' into haugesund
Diffstat (limited to 'proto/mrt/mrt.c')
-rw-r--r-- | proto/mrt/mrt.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/proto/mrt/mrt.c b/proto/mrt/mrt.c index e885611a..03f0d59e 100644 --- a/proto/mrt/mrt.c +++ b/proto/mrt/mrt.c @@ -460,7 +460,7 @@ mrt_rib_table_entry_bgp_attrs(struct mrt_table_dump_state *s, rte *r) return; fail: - mrt_log(s, "Attribute list too long for %N", r->net->n.addr); + mrt_log(s, "Attribute list too long for %N", r->net); } #endif @@ -512,24 +512,21 @@ mrt_rib_table_dump(struct mrt_table_dump_state *s, net *n, int add_path) mrt_init_message(&s->buf, MRT_TABLE_DUMP_V2, subtype); mrt_rib_table_header(s, n->n.addr); - rte *rt, *rt0; - for (rt0 = n->routes; rt = rt0; rt0 = rt0->next) + for (struct rte_storage *rt, *rt0 = n->routes; rt = rt0; rt0 = rt0->next) { - if (rte_is_filtered(rt)) + if (rte_is_filtered(&rt->rte)) continue; /* Skip routes that should be reported in the other phase */ - if (!s->always_add_path && (!rt->src->private_id != !s->add_path)) + if (!s->always_add_path && (!rt->rte.src->private_id != !s->add_path)) { s->want_add_path = 1; continue; } - if (f_run(s->filter, &rt, s->linpool, 0) <= F_ACCEPT) - mrt_rib_table_entry(s, rt); - - if (rt != rt0) - rte_free(rt); + rte e = rt->rte; + if (f_run(s->filter, &e, s->linpool, 0) <= F_ACCEPT) + mrt_rib_table_entry(s, &e); lp_flush(s->linpool); } |