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

Fix for bug in host network info collector #2821

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions supervisor/host/network.py
Expand Up @@ -345,14 +345,16 @@ def _map_nm_wifi(inet: NetworkInterface) -> Optional[WifiConfig]:
if inet.type != DeviceType.WIRELESS or not inet.settings:
return None

# Authentication
# Authentication and PSK
auth = None
psk = None
if not inet.settings.wireless_security:
auth = AuthMethod.OPEN
if inet.settings.wireless_security.key_mgmt == "none":
elif inet.settings.wireless_security.key_mgmt == "none":
auth = AuthMethod.WEP
elif inet.settings.wireless_security.key_mgmt == "wpa-psk":
auth = AuthMethod.WPA_PSK
psk = inet.settings.wireless_security.psk
Copy link
Member

Choose a reason for hiding this comment

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

Add this into structure above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add this into structure above
Added


# WifiMode
mode = WifiMode.INFRASTRUCTURE
Expand All @@ -369,7 +371,7 @@ def _map_nm_wifi(inet: NetworkInterface) -> Optional[WifiConfig]:
mode,
inet.settings.wireless.ssid,
auth,
inet.settings.wireless_security.psk,
psk,
signal,
)

Expand Down