staticd: fix bug on route reinstallation

When configuring a route with multiple next hops on boot and the
interface is missing the route never shows up (even after interface is
properly learned).

Fix: force route clean up by uninstalling it and putting it back
entirely instead of just updating the missing next hop.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
Rafael Zalamena 2022-11-28 16:44:37 -03:00
parent d8c78a8db5
commit 4fd9906bcf

View File

@ -436,6 +436,8 @@ static void static_ifindex_update_nh(struct interface *ifp, bool up,
nh->ifindex = IFINDEX_INTERNAL;
}
/* Remove previously configured route if any. */
static_uninstall_path(pn);
static_install_path(pn);
}