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
[Windows 10 Pro] Incorrect WiFi IP address reporting when not connected or turned off #2136
Comments
I think it doesn't matter whether the NIC interface is active or not. I guess IP probably remains assigned. Does |
>>> psutil.net_if_stats()["Wi-Fi"].isup |
It does correctly return false when wifi is disabled. So for my usecase I can use the isup property from net_if_stats() to exclude unassigned ip addresses. I imagine this wouldn't be a top priority especially for you/your team, but checking if the interface is up before returning related IP addresses would be nice. Maybe if I ever get to it I could submit a PR. |
Actually |
Summary
Description
net_if_addrs() reports last assigned IP address for WiFi interface even when it's not connected or turned off. I'm attaching 3 screenshots in which i start from my studio wifi, move over to my phone's hotspot and then turn off wifi, checking the IP address of the WiFi NIC in every step.
Studio WiFi
Phone Hotspot
WiFi off
You can see that after turning WiFi off it still reports the last IP address (in this case the one assigned by my phone).
In case it matters, my WiFi card is an Intel WiFi 6 AX200.
The text was updated successfully, but these errors were encountered: