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

Sort local routes first so that they're created before default routes #38

Merged
merged 2 commits into from
May 15, 2019

Conversation

fhunleth
Copy link
Member

This fixes an issue where default route creation failed. The order is now:

  1. delete/create local routes
  2. delete/create rules
  3. delete/create default routes

Deletions warn if they don't delete anything. I haven't seen this yet, but suspect that it might happen. Creates crash if they don't create. That would be unexpected.

Local routes are needed when setting default routes. Otherwise Linux
returns that the default route isn't reachable and fails the route.
There's an expectation that the route sets succeed so verify that. This
only warns when clearing routes fails, though. I am unsure whether Linux
automatically prunes routes when they're impossible. It seems harsh to
crash if a route that we want to clear doesn't exist.
@fhunleth fhunleth merged commit ba7aabe into master May 15, 2019
@fhunleth fhunleth deleted the sort-local-first branch May 15, 2019 20:34
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.

None yet

1 participant