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

cert-v2 relay stuff #1252

Merged
merged 5 commits into from
Oct 18, 2024
Merged

cert-v2 relay stuff #1252

merged 5 commits into from
Oct 18, 2024

Conversation

JackDoanRivian
Copy link
Contributor

Because hosts can have more than one IP now, we need to query the whole list of relay-fors to handle this flow:

  1. Host A -> CreateRelayRequest(HostA, (HostB's non-primary IP)) -> Relay
  2. things happen to set the relay up
  3. Host B -> replies to Host A's handshake via Relay
  4. Relay has the following relay-tionships:
    • (Host A Primary) -> (Host B secondary)
    • (Host B Primary) -> (Host A Primary)
  5. in order for this reply to make it back to Host A, we need to look at all the relays on Relay, not just the ones that exactly match the primary address
    • Said another way, if you only need to relay to node's primary IPs, this isn't a problem.
    • But, if you only "know" a non-primary IP, you have no way to discover the primary IP without a handshake, which you may need a functional relay to get.

@brad-defined
Copy link
Collaborator

I think this PR looks great - it meets the original intent of the lookup with the new concept of multiple ip's per host. We could do some optimizations, but would need to profile it to see what real impacts it would have.

The IP lookup indirection in relaying was simple before rehandshaking introduced multiple hostinfos, and the multiple IP's further complicates the picture. I don't want to hold up this PR that at least makes relays work with multiple IP's for a general relay re-think though.

@nbrownus nbrownus merged commit aa23d5f into slackhq:cert-v2 Oct 18, 2024
10 checks passed
nbrownus pushed a commit that referenced this pull request Oct 24, 2024
* relay fixes for multi-IP hosts

* more relay fixes

* more relay fixes

* tighter loop

* Revert "relay fixes for multi-IP hosts"

This reverts commit ee4495c.
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.

3 participants