Don't delete routes we never installed on darwin and the BSDs (#1933)

This commit is contained in:
Nate Brown authored and GitHub committed 2026-10-13 16:34:38 -05:00
1 parent 42280f04ce
commit 94372f4f51
5 files changed
+36 -4

No files matched your search

+2 -1
View File
@@ -399,7 +399,8 @@ func (t *tun) addRoutes(logErrors bool) error {
func (t *tun) removeRoutes(routes []Route) error {
for _, r := range routes {
if !r.Install {
if len(r.Via) == 0 || !r.Install {
// addRoutes never installs these
continue
}