When two different pipes modify the same route in two different ways
and both results are attempted to be imported into the same table,
the table complains and should ignore the whole update. Yet it did so
only if the routes were identical (which was also tested previously).
Instead of ignoring, this routine replaced the original route with the
new one from another sender which caused a discrepancy in counters in
the original sender and later crash on failed consistency check.
Discovered randomly when trying to reproduce another bug and
accidentally doing exactly this sequence of pipe collision and
then reconfiguration to rectify the collision by removing the pipe
altogether.
Fixes: #282
log_rl(&table->rl_pipe, L_ERR "Route source collision in table %s: %N %s/%u:%u",
c->table->name, i->addr, old->src->owner->name, old->src->private_id, old->src->global_id);
+
+ /* Ignore the whole update */
+ if (new)
+ {
+ rt_rte_trace_in(D_ROUTES, req, new, "collided");
+ rte_free(new_stored, table);
+ return;
+ }
}
if (new && rte_same(old, &new_stored->rte))