When exchanging routes in BGP export table, we forgot to update
the src in cases of add path off. This led to falsely claiming another
origin of that route in export table dump and also holding protocols
in the flush state because of their srcs being kept in the export tables.
/* Find existing */
struct bgp_prefix *px = bgp_find_prefix(c, ni, src, add_path_tx);
if (px)
+ {
+ /* If sending only best path, we have to exchange the stored src */
+ if (px->src != src)
+ {
+ rt_unlock_source(px->src);
+ rt_lock_source(src);
+ px->src = src;
+ }
+
return px;
+ }
/* Allocate new prefix */
px = sl_alloc(c->prefix_slab);