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

feat: wait for any wlan interface to be up before getting default gw #18

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ammmze
Copy link

@ammmze ammmze commented Apr 5, 2024

On my raspberry pi, I have disabled the built-in wifi and use a usb wifi adapter for better wifi signal. This results /sys/class/net/wlan0/operstate always being down. The workaround is to not use auto as the target and specify my gateway manually. In my case /sys/class/net/wlan1/operstate is the one that will be up when I am connected. This pull request will look for any wlan* interface to be up. Then it can proceed to get the default gateway from ip route (which still works as-is since there is nothing interface specific there).

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.

1 participant