[PR #1774] [MERGED] Linux legacy routing #15820

Closed
opened 2026-08-05 03:08:28 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1774
Author: @lixmal
Created: 3/30/2024
Status: Merged
Merged: 4/3/2024
Merged by: @lixmal

Base: mainHead: linux-legacy-routing


📝 Commits (7)

  • fc124c8 Add Linux legacy routing if ip rule functionality is not available
  • 07c747e Ignore exclusion route errors if host has no route
  • 521e57d Exclude iOS from route manager
  • a7b517e Also retrieve IPv6 routes
  • 97551a1 Ignore loopback addresses not being in the main table
  • 1e32dc1 Ignore "not supported" errors on cleanup
  • 9773028 Fix regression in ListenUDP not using fwmarks

📊 Changes

9 files changed (+655 additions, -568 deletions)

View changed files

📝 client/internal/routemanager/routemanager.go (+5 -1)
client/internal/routemanager/systemops.go (+410 -0)
📝 client/internal/routemanager/systemops_linux.go (+106 -32)
📝 client/internal/routemanager/systemops_linux_test.go (+0 -2)
📝 client/internal/routemanager/systemops_nonlinux.go (+2 -395)
📝 client/internal/routemanager/systemops_test.go (+119 -33)
client/internal/routemanager/sytemops_test.go (+0 -101)
📝 util/net/dialer.go (+1 -1)
📝 util/net/listener_generic.go (+12 -3)

📄 Description

This PR adds classic route handling on Linux if policy based routing is not available

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/1774 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 3/30/2024 **Status:** ✅ Merged **Merged:** 4/3/2024 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `main` ← **Head:** `linux-legacy-routing` --- ### 📝 Commits (7) - [`fc124c8`](https://github.com/netbirdio/netbird/commit/fc124c8b8cef3e6f8c558db9d8cbf4c3ac13f2df) Add Linux legacy routing if ip rule functionality is not available - [`07c747e`](https://github.com/netbirdio/netbird/commit/07c747e8574e235d8d788fe3770f12538c943d27) Ignore exclusion route errors if host has no route - [`521e57d`](https://github.com/netbirdio/netbird/commit/521e57db39dbb5b98d2fce78c40f8a0060f12a43) Exclude iOS from route manager - [`a7b517e`](https://github.com/netbirdio/netbird/commit/a7b517e2c5f3292f4086be1135c66a961169298b) Also retrieve IPv6 routes - [`97551a1`](https://github.com/netbirdio/netbird/commit/97551a15cabf92e70fa2dc856f17578167a4360a) Ignore loopback addresses not being in the main table - [`1e32dc1`](https://github.com/netbirdio/netbird/commit/1e32dc159e021ecabc1ffcbcf49cff015d99d263) Ignore "not supported" errors on cleanup - [`9773028`](https://github.com/netbirdio/netbird/commit/9773028f8645e16c5f9acad68481319a6dec53ce) Fix regression in ListenUDP not using fwmarks ### 📊 Changes **9 files changed** (+655 additions, -568 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/routemanager/routemanager.go` (+5 -1) ➕ `client/internal/routemanager/systemops.go` (+410 -0) 📝 `client/internal/routemanager/systemops_linux.go` (+106 -32) 📝 `client/internal/routemanager/systemops_linux_test.go` (+0 -2) 📝 `client/internal/routemanager/systemops_nonlinux.go` (+2 -395) 📝 `client/internal/routemanager/systemops_test.go` (+119 -33) ➖ `client/internal/routemanager/sytemops_test.go` (+0 -101) 📝 `util/net/dialer.go` (+1 -1) 📝 `util/net/listener_generic.go` (+12 -3) </details> ### 📄 Description This PR adds classic route handling on Linux if policy based routing is not available ## Issue ticket number and link ### Checklist - [x] 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 --- <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 03:08:28 -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#15820