[PR #1880] [MERGED] Replace powershell with route command #14386

Closed
opened 2026-08-05 02:09:54 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1880
Author: @lixmal
Created: 4/23/2024
Status: Merged
Merged: 4/26/2024
Merged by: @lixmal

Base: mainHead: fix/windows-route


📝 Commits (7)

  • 45ad1d7 Replace powershell with route command
  • 4956792 Make tests use the proper route functions, not the generic ones
  • fee6587 Cache route lookup on windows
  • 0966c16 Pass around net.Interface
  • 24f7ed1 Use legacy routing for test
  • 7033618 Fix cache and allow disabling it
  • 40c8292 Fix legacy routing test

📊 Changes

11 files changed (+160 additions, -134 deletions)

View changed files

📝 client/internal/routemanager/client.go (+15 -2)
📝 client/internal/routemanager/routemanager.go (+4 -3)
📝 client/internal/routemanager/systemops.go (+14 -28)
📝 client/internal/routemanager/systemops_android.go (+2 -2)
📝 client/internal/routemanager/systemops_darwin.go (+6 -6)
📝 client/internal/routemanager/systemops_darwin_test.go (+1 -1)
📝 client/internal/routemanager/systemops_ios.go (+2 -2)
📝 client/internal/routemanager/systemops_linux.go (+37 -24)
📝 client/internal/routemanager/systemops_nonlinux.go (+3 -2)
📝 client/internal/routemanager/systemops_test.go (+33 -15)
📝 client/internal/routemanager/systemops_windows.go (+43 -49)

📄 Description

Describe your changes

Replaces powershell with the route command and caches route lookups on windows

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/1880 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 4/23/2024 **Status:** ✅ Merged **Merged:** 4/26/2024 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `main` ← **Head:** `fix/windows-route` --- ### 📝 Commits (7) - [`45ad1d7`](https://github.com/netbirdio/netbird/commit/45ad1d73bc3dbcb71326fd4071acf5b235bda45d) Replace powershell with route command - [`4956792`](https://github.com/netbirdio/netbird/commit/49567923cf3b02cb89a4532a7fbc7827396bbcad) Make tests use the proper route functions, not the generic ones - [`fee6587`](https://github.com/netbirdio/netbird/commit/fee65879d980914b7b1e370798635deef9b89156) Cache route lookup on windows - [`0966c16`](https://github.com/netbirdio/netbird/commit/0966c16c97f0cfd4a47a6e9aa4e53b3fa3948cb8) Pass around net.Interface - [`24f7ed1`](https://github.com/netbirdio/netbird/commit/24f7ed172069235f14c09a3ec7cd2d36228ce6b7) Use legacy routing for test - [`7033618`](https://github.com/netbirdio/netbird/commit/7033618cf966e4939c3b716a6f5de5bdbc1f336c) Fix cache and allow disabling it - [`40c8292`](https://github.com/netbirdio/netbird/commit/40c8292bb7cc5168c1f37570de3e697a68521e91) Fix legacy routing test ### 📊 Changes **11 files changed** (+160 additions, -134 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/routemanager/client.go` (+15 -2) 📝 `client/internal/routemanager/routemanager.go` (+4 -3) 📝 `client/internal/routemanager/systemops.go` (+14 -28) 📝 `client/internal/routemanager/systemops_android.go` (+2 -2) 📝 `client/internal/routemanager/systemops_darwin.go` (+6 -6) 📝 `client/internal/routemanager/systemops_darwin_test.go` (+1 -1) 📝 `client/internal/routemanager/systemops_ios.go` (+2 -2) 📝 `client/internal/routemanager/systemops_linux.go` (+37 -24) 📝 `client/internal/routemanager/systemops_nonlinux.go` (+3 -2) 📝 `client/internal/routemanager/systemops_test.go` (+33 -15) 📝 `client/internal/routemanager/systemops_windows.go` (+43 -49) </details> ### 📄 Description ## Describe your changes Replaces powershell with the route command and caches route lookups on windows ## Issue ticket number and link ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:09:54 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#14386