Files
netbird/client/internal/routemanager/systemops
Zoltán Papp 7a1c2f08b8 [client] Handle EEXIST when adding routes on macOS/BSD
On macOS, routes from a previous session can survive across sleep/wake
cycles even though cleanup reports success. When the new engine instance
tries to add the same route, it fails with "file exists" (EEXIST),
leaving the route untracked by the route manager while the OS still
has it pointing at a stale interface.

Handle this by detecting EEXIST on RTM_ADD, removing the stale route,
and retrying. This matches how Linux silently handles existing routes
via netlink.
2026-04-09 17:19:29 +02:00
..