diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2022-11-28 16:44:37 -0300 |
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2023-01-13 15:32:12 -0300 |
| commit | 4fd9906bcfe5f5001c6fc092c4d12c299929dcdf (patch) | |
| tree | b93ed6c9a01a49b54c4b87f5b207c51a5be4d3f6 /staticd | |
| parent | d8c78a8db541868e709d56b715d08be94cf6be59 (diff) | |
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>
Diffstat (limited to 'staticd')
| -rw-r--r-- | staticd/static_routes.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |
