Skip to content

Conversation

@kradalby
Copy link
Collaborator

@kradalby kradalby commented Nov 1, 2025

When we fixed the issue of node visibility of nodes
that only had access to each other because of a subnet
route, we gave all nodes access to all exit routes by
accident.

This commit splits exit nodes and subnet routes in the
access.

If a matcher indicates that the node should have access to
any part of the subnet routes, we do not remove it from the
node list.

If a matcher destination is equal to the internet, and the
target node is an exit node, we also do not remove the access.

Fixes #2784
Fixes #2788

@kradalby kradalby requested a review from juanfont as a code owner November 1, 2025 21:35
There are situations where the subnet routes and exit nodes
must be treated differently. This splits it so SubnetRoutes
only returns routes that are not exit routes.

It adds `IsExitRoutes` and `AllApprovedRoutes` for convenience.

Signed-off-by: Kristoffer Dalby <[email protected]>
When we fixed the issue of node visibility of nodes
that only had access to eachother because of a subnet
route, we gave all nodes access to all exit routes by
accident.

This commit splits exit nodes and subnet routes in the
access.

If a matcher indicates that the node should have access to
any part of the subnet routes, we do not remove it from the
node list.

If a matcher destination is equal to the internet, and the
target node is an exit node, we also do not remove the access.

Fixes juanfont#2784
Fixes juanfont#2788

Signed-off-by: Kristoffer Dalby <[email protected]>
@kradalby kradalby force-pushed the kradalby/2788-exit-visibility branch from f63d45b to f247467 Compare November 2, 2025 09:38
@kradalby kradalby merged commit 2024219 into juanfont:main Nov 2, 2025
93 of 95 checks passed
nblock added a commit to nblock/headscale that referenced this pull request Nov 5, 2025
nblock added a commit that referenced this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants