VPN-6517: Fix contention between LAN bypass and DNS killswitch on Windows #9795
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Previously, on the LAN bypass saga, our heros sought to make LAN bypass better by utilizing route cloning to direct traffic outside of the VPN tunnel, which required the addition of a new method
WindowsFirewall::enableLanBypass()
to specifically permit LAN traffic through the firewall that would be otherwise blocked by the "Block internet" rule.Unfortunately, this filter rule shared the same weight as the DNS killswitch rule in
WindowsFirewall::enableInterface()
which makes it unclear which firewall rule will apply to DNS traffic sent to the LAN. This means that a web browser might start before the VPN and decide that the user's LAN should be used for DNS, fail to detect that the VPN has changed DNS configuration, and then merrily continue to use the LAN for its DNS resolution so long the traffic keeps flowing.To resolve this, we need to reorder things slightly. In order from lowest to highest weight:
Reference
JIRA Issue: VPN-6517
Bug introduced by: #9674
Checklist