]> git.puffer.fish Git - matthieu/frr.git/commit
lib: fix bug in if_cmp_name_func()
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 4 Oct 2017 23:13:56 +0000 (20:13 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 10 Oct 2017 12:05:02 +0000 (09:05 -0300)
commitc9cbbb4054b85947f1ddc52f1ae0b3e18794c784
tree387c22e541120189140e4d0dac818b398dc0016b
parentff880b78ef2d480b381d29487812279d57c0bbac
lib: fix bug in if_cmp_name_func()

If the p1 and p2 arguments pointed to identical strings ending with
a non-numeric character (e.g. "lo"), this function would return -1
instead of 0 as one would expect. This inconsistency didn't matter
for sorted linked-lists but for red-black trees it's a major source
of problems.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/if.c