[PR #6808] [MERGED] [client] Disable gVisor TCP RACK loss detection on Windows #27144

Closed
opened 2026-08-05 07:08:16 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/6808
Author: @lixmal
Created: 7/16/2026
Status: Merged
Merged: 7/17/2026
Merged by: @lixmal

Base: 0.74.7-branchHead: disable-tcp-rack-windows


📝 Commits (2)

  • bff6bd5 Disable gVisor TCP RACK loss detection on Windows
  • 80e283b Point wireguard-go replace at merged commit

📊 Changes

3 files changed (+40 additions, -3 deletions)

View changed files

📝 client/firewall/uspfilter/forwarder/forwarder.go (+37 -0)
📝 go.mod (+1 -1)
📝 go.sum (+2 -2)

📄 Description

Describe your changes

On Windows, gVisor's RACK loss detection handles ACKs poorly, causing spurious retransmissions and a collapsed congestion window that severely caps TCP throughput on routed connections through the userspace forwarder. This disables RACK on Windows to restore throughput.

  • Disable gVisor RACK loss detection on Windows in the userspace forwarder, with an NB_FORCE_TCP_RACK environment override to force it on or off on any platform
  • Bump the wireguard-go fork to also disable RACK on Windows for the netstack-mode interface

N/A

Stack

  • 0.74.7-branch - ⚠️ No PR associated with branch

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)
  • This change does not modify the public API, gRPC protocols, functionality behavior, CLI / service flags, or introduce a new feature — OR I have discussed it with the NetBird team beforehand (link the issue / Slack thread in the description). See CONTRIBUTING.md.

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Internal transport-layer performance fix; the environment override is a diagnostic knob, not a user-facing feature.


View with Codesmith Autofix with Codesmith Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes

    • Improved TCP connection recovery on Windows to reduce issues caused by loss-detection behavior.
    • Added safer handling when applying TCP recovery settings, with clear diagnostic logging.
  • Configuration

    • Added an optional environment setting to override the default TCP recovery behavior when needed.

🔄 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/6808 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 7/16/2026 **Status:** ✅ Merged **Merged:** 7/17/2026 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `0.74.7-branch` ← **Head:** `disable-tcp-rack-windows` --- ### 📝 Commits (2) - [`bff6bd5`](https://github.com/netbirdio/netbird/commit/bff6bd58af9277f19aef56c709689a547ff0fe3c) Disable gVisor TCP RACK loss detection on Windows - [`80e283b`](https://github.com/netbirdio/netbird/commit/80e283bdf1d622858310392f91af3f1e3fd82d38) Point wireguard-go replace at merged commit ### 📊 Changes **3 files changed** (+40 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `client/firewall/uspfilter/forwarder/forwarder.go` (+37 -0) 📝 `go.mod` (+1 -1) 📝 `go.sum` (+2 -2) </details> ### 📄 Description ## Describe your changes On Windows, gVisor's RACK loss detection handles ACKs poorly, causing spurious retransmissions and a collapsed congestion window that severely caps TCP throughput on routed connections through the userspace forwarder. This disables RACK on Windows to restore throughput. - Disable gVisor RACK loss detection on Windows in the userspace forwarder, with an `NB_FORCE_TCP_RACK` environment override to force it on or off on any platform - Bump the wireguard-go fork to also disable RACK on Windows for the netstack-mode interface ## Issue ticket number and link N/A ## Stack - `0.74.7-branch` - :warning: No PR associated with branch <!-- branch-stack --> - \#6808 :point\_left: ### 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) - [ ] This change does **not** modify the public API, gRPC protocols, functionality behavior, CLI / service flags, or introduce a new feature — **OR** I have discussed it with the NetBird team beforehand (link the issue / Slack thread in the description). See [CONTRIBUTING.md](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTING.md#discuss-changes-with-the-netbird-team-first). > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) Internal transport-layer performance fix; the environment override is a diagnostic knob, not a user-facing feature. <!-- codesmith:footer --> *** <a href="https://app.blacksmith.sh/netbirdio/codesmith/netbird/pr/6808"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with Codesmith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1786816060&installation_id=146802194&pr_number=6808&repository=netbirdio%2Fnetbird&return_to=https%3A%2F%2Fgithub.com%2Fnetbirdio%2Fnetbird%2Fpull%2F6808&signature=f288c03acf235e382791e9bde2d687ca3dc486db282cb449313396dabc070c27"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with Codesmith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a> <sup>Need help on this PR? Tag <code>/codesmith</code> with what you need. Autofix is disabled.</sup> <!-- codesmith:autofix:disabled --> <!-- /codesmith:footer --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved TCP connection recovery on Windows to reduce issues caused by loss-detection behavior. - Added safer handling when applying TCP recovery settings, with clear diagnostic logging. - **Configuration** - Added an optional environment setting to override the default TCP recovery behavior when needed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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 07:08:16 -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#27144