diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2019-08-27 03:31:21 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2019-09-18 19:35:10 +0200 |
commit | 6b5d6e2dbc885cd389bb694e7b83a76652b09bd5 (patch) | |
tree | 76cdfa32a5695d853adc53108c058588596d4f22 /lib/northbound.h | |
parent | lib: fix corner case when iterating over YANG-modeled operational data (diff) | |
download | frr-6b5d6e2dbc885cd389bb694e7b83a76652b09bd5.tar.xz frr-6b5d6e2dbc885cd389bb694e7b83a76652b09bd5.zip |
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>
Diffstat (limited to 'lib/northbound.h')
-rw-r--r-- | lib/northbound.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/northbound.h b/lib/northbound.h index 50bddd157..fbd7771db 100644 --- a/lib/northbound.h +++ b/lib/northbound.h @@ -457,6 +457,7 @@ struct nb_config { struct nb_config_cb { RB_ENTRY(nb_config_cb) entry; enum nb_operation operation; + uint32_t seq; char xpath[XPATH_MAXLEN]; const struct nb_node *nb_node; const struct lyd_node *dnode; |