summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2021-01-22 04:34:15 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2021-01-22 04:34:15 +0100
commit5d414309ec5a01024d4de4c4f9521f8daa5c06ff (patch)
tree7f96e87a090f4a85cbbcae18815d16bc083dd035
parentdf83f626973fda1e67769d295c47d4d246e4c1c4 (diff)
MRT: Fix MP-BGP next hops
Flag signalling that MP-BGP mode should be used got reset after first batch of routes, so remaining routes were processed without that, leading to missing MP_REACH_NLRI attribute. Thanks to Piotr Wydrych for the bugreport.
-rw-r--r--proto/mrt/mrt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/mrt/mrt.c b/proto/mrt/mrt.c
index 76d6c48f..838360c2 100644
--- a/proto/mrt/mrt.c
+++ b/proto/mrt/mrt.c
@@ -244,7 +244,6 @@ mrt_next_table(struct mrt_table_dump_state *s)
s->table = tab;
s->ipv4 = tab ? (tab->addr_type == NET_IP4) : 0;
- s->bws->mp_reach = !s->ipv4;
if (s->table)
rt_lock_table(s->table);
@@ -434,6 +433,7 @@ mrt_rib_table_entry_bgp_attrs(struct mrt_table_dump_state *s, rte *r)
mrt_buffer_need(b, MRT_ATTR_BUFFER_SIZE);
byte *pos = b->pos;
+ s->bws->mp_reach = !s->ipv4;
s->bws->mp_next_hop = NULL;
/* Encode BGP attributes */