]> git.puffer.fish Git - mirror/frr.git/commit
zebra: make rib_add() a simple wrapper for rib_add_multipath() 1213/head
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 20 Sep 2017 23:14:38 +0000 (20:14 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Thu, 21 Sep 2017 16:27:50 +0000 (13:27 -0300)
commit66af68454bbace3e11e0e3a6dd865f2046939487
tree4ce8748fbefafaca84aaa0d4bfea1057a9f99ee0
parent844b3a8748cce00fdcc913d7ff89f181b7fd9dd1
zebra: make rib_add() a simple wrapper for rib_add_multipath()

Both function were very similar, and as we know code duplication is not
good. As an example, in the past couple of weeks some fixes were made
on rib_add() but not on rib_add_multipath(), causing known bugs to still
exist in a different form.

Instead of merging the two functions into one, let's make rib_add()
call rib_add_multipath() with the appropriate parameters. This way we
remove the code duplication but still keep the easy-to-use rib_add()
function for single-path routes.

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