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

Various small fixes #43

Merged
merged 12 commits into from
May 29, 2019
Merged

Various small fixes #43

merged 12 commits into from
May 29, 2019

Conversation

fhunleth
Copy link
Member

It's easiest to review the commits individually since they're each pretty small. I'll definitely split if any prove controversial.

At a high level, this fixes a few blatant bugs and fixes a supervision issue where RouteManager and Interface crashes were not recoverable. The fundamental issues were 1) incorrect supervision strategy (now :rest_for_one) and 2) ifdown always needs to be tried to prevent ifup from exiting without doing anything.

5 seconds was too short to wait for WiFi to connect. Bump the timeout to
60 seconds since that seems safe right now based on watching
wpa_supplicant.
This lets vintage_net technologies only have to deal with a single way
of specifying a configuration. Currently this is helpful when fixing
WPA2 passphrases that were passed in the psk field. In the future, it
will be helpful when migrating old ways of specifying configurations.
This was getting lost in the info messages. It seems more important. No
action is taken to erase or move the file out of the way, so the warning
will get printed every init.
This was broken when the `:local_route` tuple was updated to include the
routing table.
The router was incorrectly calling "ip" with them. This also tightens up
many function calls leading up to the incorrect behavior to try to catch
it earlier. It also adds a test.
This removes stale and unset values from having to be handled by
users.
This also simplifies the connectivity code slightly and moves some
initialization out of `init/1` just in case it crashes.
This is needed to recover from GenServer crashes inside `vintage_net`.
When that happens, the state of the interface isn't known. Rather than
trying to figure anything out, just tear it all down and restart.
The exit status is ignored from `ifdown`.
RouteManager isn't supposed to crash, but if it does, it resets the
routing tables to a clean slate so all interfaces need to reconfigure
themselves to get the state back.
lib/vintage_net/interface.ex Show resolved Hide resolved
@fhunleth fhunleth merged commit d97af0d into master May 29, 2019
@fhunleth fhunleth deleted the ap-fixes branch May 29, 2019 18:01
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

2 participants