Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change allow list to evaluate all vpnaddr tables when available #1330

Open
wants to merge 1 commit into
base: cert-v2
Choose a base branch
from

Conversation

nbrownus
Copy link
Collaborator

This changes the allow list to operate on all known overlay addresses for a remote instead of just the currently used overlay address, when possible.

Since the default is to allow all, any deny is specific intent to not communicate with a remote host on that underlay range, so to reflect that intent we need to evaluate the underlay address against each of the overlay addresses allow list tables.

There is 1 tricky spot with stage 2 handshakes where we could operate on all known addresses but that would pollute our noise state since we have to consume the packet and ratchet the state forward to get a full set of overlay addresses in the remote certificate. Currently this is not being done but we can achieve it if deemed necessary, ideally the remote side has identical configuration that would have blocked this underlay route from being used.

There is also a similar issue with the lighthouse where it operates on the overlay address reported by the node instead of all overlay addresses in the hostinfo for the reporting node. If we leave it as it is now then it allows some surgical options in the lighthouse configuration but the effect is mismatched from non lighthouse node configuration.

Copy link
Member

@wadey wadey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Info("Host roamed to new udp ip/port.")
hostinfo.lastRoam = time.Now()
hostinfo.lastRoamRemote = hostinfo.remote
hostinfo.SetRemote(vpnAddr)
hostinfo.SetRemote(udpAddr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants