[PR #3007] fix(windows): ignore unroutable split tunnel addresses #3049

Open
opened 2026-10-14 21:07:09 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-client/pull/3007
Author: @ShiroKSH
Created: 8/18/2026
Status: 🔄 Open

Base: dev ← Head: fix/windows-app-split-route-selection


📝 Commits (2)

  • 1dd9f18 fix(windows): select routable split tunnel addresses
  • f32c0ae fix(windows): declare split address dependencies

📊 Changes

1 file changed (+57 additions, -19 deletions)

View changed files

📝 client/platforms/windows/daemon/windowssplittunnel.cpp (+57 -19)

📄 Description

Summary

  • read split-tunnel source addresses from the Windows unicast address table
  • ignore addresses marked SkipAsSource and non-routable addresses such as link-local IPv6
  • prefer usable addresses with the best duplicate-address-detection state and zero an unavailable IPv6 address

Problem

WindowsSplitTunnel::getAddress() selected the first IPv4 and IPv6 entries exposed by QNetworkInterface. On common IPv4 networks where Windows assigns only a link-local fe80::/10 IPv6 address, that unusable address was registered with the split-tunnel driver as the physical internet address. Excluded applications could then lose connectivity or continue through the VPN.

The selection now follows Windows source-address metadata and only registers addresses that can actually be used for outbound traffic. This ports the relevant address-selection fix from Mozilla VPN #10225, whose split-tunnel implementation is the source of this code.

This addresses the link-local source-selection failure behind reports such as #2165 and #2586. It is independent of the on-link route-capture fix in #2835.

Verification

  • git diff --check origin/dev...HEAD
  • verified the affected topology locally: the physical adapter has a preferred RFC 1918 IPv4 address and only a preferred link-local IPv6 address; the new policy selects IPv4 and leaves IPv6 unset
  • compared address filtering and DAD-state preference with the reviewed Mozilla implementation
  • confirmed the patch does not alter firewall rules or route capture
  • Codacy Static Code Analysis passed with no annotations

🔄 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/amnezia-vpn/amnezia-client/pull/3007 **Author:** [@ShiroKSH](https://github.com/ShiroKSH) **Created:** 8/18/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `fix/windows-app-split-route-selection` --- ### 📝 Commits (2) - [`1dd9f18`](https://github.com/amnezia-vpn/amnezia-client/commit/1dd9f185c7a8c91e4cf1bd4186e62207dec16fa3) fix(windows): select routable split tunnel addresses - [`f32c0ae`](https://github.com/amnezia-vpn/amnezia-client/commit/f32c0ae7adf78f32fe51696b193177d5ea28a331) fix(windows): declare split address dependencies ### 📊 Changes **1 file changed** (+57 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `client/platforms/windows/daemon/windowssplittunnel.cpp` (+57 -19) </details> ### 📄 Description ## Summary - read split-tunnel source addresses from the Windows unicast address table - ignore addresses marked `SkipAsSource` and non-routable addresses such as link-local IPv6 - prefer usable addresses with the best duplicate-address-detection state and zero an unavailable IPv6 address ## Problem `WindowsSplitTunnel::getAddress()` selected the first IPv4 and IPv6 entries exposed by `QNetworkInterface`. On common IPv4 networks where Windows assigns only a link-local `fe80::/10` IPv6 address, that unusable address was registered with the split-tunnel driver as the physical internet address. Excluded applications could then lose connectivity or continue through the VPN. The selection now follows Windows source-address metadata and only registers addresses that can actually be used for outbound traffic. This ports the relevant address-selection fix from [Mozilla VPN #10225](https://github.com/mozilla-mobile/mozilla-vpn-client/pull/10225), whose split-tunnel implementation is the source of this code. This addresses the link-local source-selection failure behind reports such as #2165 and #2586. It is independent of the on-link route-capture fix in #2835. ## Verification - `git diff --check origin/dev...HEAD` - verified the affected topology locally: the physical adapter has a preferred RFC 1918 IPv4 address and only a preferred link-local IPv6 address; the new policy selects IPv4 and leaves IPv6 unset - compared address filtering and DAD-state preference with the reviewed Mozilla implementation - confirmed the patch does not alter firewall rules or route capture - Codacy Static Code Analysis passed with no annotations --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#3049
No description provided.