]> git.puffer.fish Git - mirror/frr.git/commit
lib: Fix comparison function in link_state.c 9879/head
authorOlivier Dugeon <olivier.dugeon@orange.com>
Mon, 25 Oct 2021 09:52:19 +0000 (11:52 +0200)
committerOlivier Dugeon <olivier.dugeon@orange.com>
Fri, 29 Oct 2021 08:16:12 +0000 (10:16 +0200)
commitf4157b4f6e4df3bf2c008f38bc8b8e68a786463e
tree8e44dffc0cabe0cd8b5aa68d09f178a302fd9923
parentcbdf0306139d64f3967e8f8ba321a39f32281b56
lib: Fix comparison function in link_state.c

ls_node_same, ls_attributes_same and ls_prefix_same are not producing expected
result due to a wrong usage of memcmp. In addition, if respective structures
are not initialized with 0, there is a risk that the comparison failed.

This patch correct usage of memcmp and expand comparison to each invidual
parameters of the respective structure for safer result.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
lib/link_state.c
lib/link_state.h