From 4fd9906bcfe5f5001c6fc092c4d12c299929dcdf Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Mon, 28 Nov 2022 16:44:37 -0300 Subject: [PATCH] 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 --- staticd/static_routes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/staticd/static_routes.c b/staticd/static_routes.c index 3595cc5644..ccbb98bd11 100644 --- a/staticd/static_routes.c +++ b/staticd/static_routes.c @@ -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); }