[PR #3260] [CLOSED] [client] Fix WireGuard watch error handling #22076

Open
opened 2026-08-05 05:09:19 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/3260
Author: @pappz
Created: 1/31/2025
Status: Closed

Base: mainHead: fix/wg-watch


📝 Commits (10+)

  • 627a3b0 Move wg watcher code to separated file and add tests
  • a247b91 If can not read WireGuard state then trigger reconnection
  • d6c2aab Wait DisableWgWatcher to exit from periodic check loop
  • 2067836 Code cleaning in callbacks
  • ed13422 Code cleaning
  • bcb2892 [client] Use dynamic dns route resolution on iOS (#3243)
  • 987bba1 [management] copy destination and source resource on policyRUle copy (#3235)
  • e905957 [client] Replace engine probes with direct calls (#3195)
  • 34d67c8 [misc] Update sign pipeline version (#3246)
  • 37ef03c [client] Add missing peer ACL flush (#3247)

📊 Changes

18 files changed (+431 additions, -403 deletions)

View changed files

📝 .github/workflows/release.yml (+1 -1)
📝 client/cmd/up.go (+1 -1)
📝 client/firewall/nftables/acl_linux.go (+5 -0)
📝 client/internal/connect.go (+6 -11)
📝 client/internal/engine.go (+41 -86)
📝 client/internal/peer/conn.go (+15 -22)
📝 client/internal/peer/guard/guard.go (+12 -24)
client/internal/peer/wg_watcher.go (+134 -0)
client/internal/peer/wg_watcher_test.go (+98 -0)
📝 client/internal/peer/worker_ice.go (+6 -11)
📝 client/internal/peer/worker_relay.go (+21 -106)
client/internal/probe.go (+0 -58)
📝 client/internal/routemanager/client.go (+2 -1)
📝 client/server/server.go (+18 -28)
📝 management/server/types/policyrule.go (+14 -12)
📝 relay/client/client.go (+0 -18)
📝 relay/client/guard.go (+48 -23)
📝 relay/client/manager.go (+9 -1)

📄 Description

Describe your changes

This PR was created for test purposes. It is a mix of

  • fix/relay-reconnection
  • wgwatcher-test

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/3260 **Author:** [@pappz](https://github.com/pappz) **Created:** 1/31/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/wg-watch` --- ### 📝 Commits (10+) - [`627a3b0`](https://github.com/netbirdio/netbird/commit/627a3b0392b007e8a1f20ec1c29a3e6499263871) Move wg watcher code to separated file and add tests - [`a247b91`](https://github.com/netbirdio/netbird/commit/a247b9157f3555034ae280a18df1902812929de2) If can not read WireGuard state then trigger reconnection - [`d6c2aab`](https://github.com/netbirdio/netbird/commit/d6c2aabea98a35e44d37dccf21074693a05f1c78) Wait DisableWgWatcher to exit from periodic check loop - [`2067836`](https://github.com/netbirdio/netbird/commit/20678366595a627d979d176f49695d789ee24d17) Code cleaning in callbacks - [`ed13422`](https://github.com/netbirdio/netbird/commit/ed1342289294b0665e8daa04dc88f60e96e36853) Code cleaning - [`bcb2892`](https://github.com/netbirdio/netbird/commit/bcb28922bf7512c9bbd5cc1d74c1f5c79d640ab7) [client] Use dynamic dns route resolution on iOS (#3243) - [`987bba1`](https://github.com/netbirdio/netbird/commit/987bba1831a2fca5ac2d8075f778fa89aa4a54c3) [management] copy destination and source resource on policyRUle copy (#3235) - [`e905957`](https://github.com/netbirdio/netbird/commit/e905957aa33cb0d0c7ce2269d645ff579a1c9877) [client] Replace engine probes with direct calls (#3195) - [`34d67c8`](https://github.com/netbirdio/netbird/commit/34d67c86f292ee455ff987c84619b68c8eb4ee18) [misc] Update sign pipeline version (#3246) - [`37ef03c`](https://github.com/netbirdio/netbird/commit/37ef03c0f53419e47ea584ed0fa09b9c76cbfeb2) [client] Add missing peer ACL flush (#3247) ### 📊 Changes **18 files changed** (+431 additions, -403 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/release.yml` (+1 -1) 📝 `client/cmd/up.go` (+1 -1) 📝 `client/firewall/nftables/acl_linux.go` (+5 -0) 📝 `client/internal/connect.go` (+6 -11) 📝 `client/internal/engine.go` (+41 -86) 📝 `client/internal/peer/conn.go` (+15 -22) 📝 `client/internal/peer/guard/guard.go` (+12 -24) ➕ `client/internal/peer/wg_watcher.go` (+134 -0) ➕ `client/internal/peer/wg_watcher_test.go` (+98 -0) 📝 `client/internal/peer/worker_ice.go` (+6 -11) 📝 `client/internal/peer/worker_relay.go` (+21 -106) ➖ `client/internal/probe.go` (+0 -58) 📝 `client/internal/routemanager/client.go` (+2 -1) 📝 `client/server/server.go` (+18 -28) 📝 `management/server/types/policyrule.go` (+14 -12) 📝 `relay/client/client.go` (+0 -18) 📝 `relay/client/guard.go` (+48 -23) 📝 `relay/client/manager.go` (+9 -1) </details> ### 📄 Description ## Describe your changes This PR was created for test purposes. It is a mix of - fix/relay-reconnection - wgwatcher-test ## Issue ticket number and link ### 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 --- <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 05:09:19 -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#22076