Skip to content

ts_runtime: wait to build routes until derp map is populated#282

Open
dylan-tailscale wants to merge 1 commit into
mainfrom
dylan/route-error
Open

ts_runtime: wait to build routes until derp map is populated#282
dylan-tailscale wants to merge 1 commit into
mainfrom
dylan/route-error

Conversation

@dylan-tailscale

Copy link
Copy Markdown
Collaborator

Prevents RouteUpdater::build_routes() from attempting to build routes to peers until it's received at least one DerpTransportMap message.

Also adds a Default implementation to PeerRoutesInner. This seems slightly cleaner to me, but open to changing it back to separate vars, mostly looking for feedback if what I've done is unidiomatic.

Closes #279.

Signed-off-by: Dylan Bargatze <dylan@tailscale.com>

@nrc nrc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The Default impl seems fine, question about the flag though

peer_state: Arc<PeerState>,
env: Env,
/// Prevents building routes until the first `DerpTransportMap` has been processed.
is_initialized: bool,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could derp_transport_map be an Option rather than adding a bool here?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ts_runtime: route updater spews errors before multiderp regions are populated

2 participants