summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-06-02 13:22:12 +0200
committerThomas Haller <thaller@redhat.com>2022-06-02 13:25:10 +0200
commitfe7bdaa7e496842ce868e40dee032dc42fe2b3e4 (patch)
tree646926c03be45c96c4e605b354821fbc3a0009d3
parent3d272d264c0c19148b3f524756d2ec86388cd574 (diff)
downloadNetworkManager-fe7bdaa7e496842ce868e40dee032dc42fe2b3e4.tar.gz
wifi: fix crash in NMDeviceWifi.check_connection_compatible() checking WEP capability
https://bugzilla.redhat.com/show_bug.cgi?id=2092782 Fixes: feee84aac427 ('wifi: mark WEP connections incompatible if supplicant lacks capability')
-rw-r--r--src/core/devices/wifi/nm-device-wifi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/devices/wifi/nm-device-wifi.c b/src/core/devices/wifi/nm-device-wifi.c
index d83b1f358f..2572213c46 100644
--- a/src/core/devices/wifi/nm-device-wifi.c
+++ b/src/core/devices/wifi/nm-device-wifi.c
@@ -1076,8 +1076,9 @@ check_connection_compatible(NMDevice *device, NMConnection *connection, GError *
if (s_wsec) {
key_mgmt = nm_setting_wireless_security_get_key_mgmt(s_wsec);
- if (nm_supplicant_interface_get_capability(priv->sup_iface, NM_SUPPL_CAP_TYPE_WEP)
- == NM_TERNARY_FALSE
+ if (priv->sup_iface
+ && nm_supplicant_interface_get_capability(priv->sup_iface, NM_SUPPL_CAP_TYPE_WEP)
+ == NM_TERNARY_FALSE
&& NM_IN_STRSET(key_mgmt, "ieee8021x", "none")) {
nm_utils_error_set_literal(error,
NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY,