]> git.proxmox.com Git - mirror_frr.git/commit - zebra/zebra_vty.c
zebra: refactor zebra_static_ipv4() and static_ipv6_func()
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 27 Jul 2017 18:52:52 +0000 (15:52 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 28 Jul 2017 02:39:35 +0000 (23:39 -0300)
commitc6cef20ba9d317792a9742c3efb728f4aa766dad
tree7f8224aa2d9ddaa1890edf5e03e2bf60dc0d1287
parent33df4bb219d6c5b972877434c57fa85543dc8a5e
zebra: refactor zebra_static_ipv4() and static_ipv6_func()

This is a preliminary step to join both functions into one later.

The main idea here is to make these functions have separate arguments
for the nexthop address and the nexthop interface, and adjust the call
sites appropriately. Having an argument that could be a nexthop address
OR a nexthop interface was making the code very hard to follow. With
this simplification, a lot of code duplication was removed and now both
functions look very similar.

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