Skip to content

fix: stop spamming DERP map updates for equivalent maps #11792

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

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented Jan 24, 2024

Fixes 2 related issues:

  1. wsconncache had incorrect logic to test whether to send DERPMap updates, sending if the maps were equivalent, instead of if they were not equivalent.
  2. configmaps used a bugged check to test equality between DERPMaps, since it contains a map and the map entries are serialized in random order. Instead, we avoid comparing the protobufs and instead depend on the existing function that compares tailcfg.DERPMap. This also has the effect of reducing the number of times we convert to and from protobuf.

@spikecurtis spikecurtis marked this pull request as ready for review January 24, 2024 10:30
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Syntactically correct, but I'm not super familiar with the tailnet code internals. Thanks for addressing the issue!

@spikecurtis spikecurtis merged commit 5cbb76b into main Jan 24, 2024
@spikecurtis spikecurtis deleted the spike/fix-derp-spam branch January 24, 2024 12:27
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants