FXVPN-218: Fix busted split tunneling on Linux #9987
Merged
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
In PR #9906 I messed around a bit with the firewall rules to get IPv6 traffic to split tunnel correctly when originating with a firewall mark (eg:
sudo ping6 -m 51820 <dest>
) by making better use of connection tracking to re-set the firewall mark upon packet reception.However, I goofed up during the rebase and I forgot the most important part of that change: the firewall mark has to be applied after connection tracking, and unfortunately a raw hook happens before connection tracking. The result of that error is that split tunneling just doesn't work on some machines because the inbound packets loose their firewall mark and get rejected by RPF.
To fix this, we just need to adjust the priority of the
preroute
chain fromChainPriorityRaw
toChainPriorityMangle
so that it happens after connection tracking.Reference
Bug introduced by #9906
Related JIRA Issue: FXVPN-218
Checklist