]> git.proxmox.com Git - mirror_frr.git/commit
lib: fix ordering issues in the northbound
authorRenato Westphal <renato@opensourcerouting.org>
Tue, 27 Aug 2019 01:31:21 +0000 (22:31 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 18 Sep 2019 17:35:10 +0000 (14:35 -0300)
commit6b5d6e2dbc885cd389bb694e7b83a76652b09bd5
tree76cdfa32a5695d853adc53108c058588596d4f22
parent6cd301e048cfeb5c57fbbaa005f9fc62aeac563e
lib: fix ordering issues in the northbound

When a configuration transaction is being performed, the northbound
uses a red-black tree to store the configuration changes that need to
be processed. The problem is that we were sorting the configuration
changes based on their XPaths (and callback priorities). This means
the original order of the changes wasn't being respected, which is
a problem for lists that use the "ordered-by user" statement. To
fix this, add a new "seq" member to the "nb_config_cb" structure
so that we can preserve the order of the configuration changes as
told by libyang.

Since none of the FRR modules use "ordered-by user" lists so far,
no daemon was affected by this problem.

Reported-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/northbound.c
lib/northbound.h