]> git.puffer.fish Git - mirror/frr.git/commit
lib: fix prefix list trie corruption 964/head
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 11 Aug 2017 16:54:26 +0000 (18:54 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 11 Aug 2017 17:02:08 +0000 (19:02 +0200)
commit6ac011aaadbf6ef1a3b64b6a2518da11ea62a2ab
tree4ce0da59b1b5dfee77062fd5facd62ca2d5b03c4
parentc47b10cae1e0a623589692d6bd8793c2a17ed29a
lib: fix prefix list trie corruption

The specific code here needs to establish an absolute order of more
specific to less specific possible matches in a prefix list.  This is
indirectly checked by an assert on insertion, because the "next best"
entry is required to be consistent even when joining multiple chains
of candidates.

Unfortunately, trie_install_fn() would insert entries too far ahead in
the chain if another entry with higher sequence number was seen.  This
breaks the trie and (rightfully) triggers the assertion failure on
insert.

Fixes: #937
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/plist.c