summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2021-03-09 07:41:00 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2021-03-11 10:06:38 +0100
commit840e54a96cc3d63ca8ebe889e873b03577f9eb10 (patch)
tree21a62168a90537b6c8b44eaaf4f948e204d863df
parent5e3482caec839f0ef53999cc5d5ebb837043d256 (diff)
downloadNetworkManager-bg/802-1x-supplicant-fix.tar.gz
devices: fail optional-802.1X connections if supplicant disappearsbg/802-1x-supplicant-fix
802-1x.optional=yes means that NM should tolerate a failure or a timeout of the 802.1X authentication and should keep the connection up. Even if the authentication doesn't succeed, NM keeps the supplicant running so that it can continue trying. If the supplicant disappears because it crashed or was killed externally, NM should fail the connection so that it can be retried. The current code is wrong also because after releasing the supplicant interface, it calls wired_auth_cond_fail() which tries to connect a signal to priv->supplicant.iface (which is NULL). https://bugzilla.redhat.com/show_bug.cgi?id=1934291 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/776
-rw-r--r--src/core/devices/nm-device-ethernet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/devices/nm-device-ethernet.c b/src/core/devices/nm-device-ethernet.c
index 064d79f5c2..c517c81c89 100644
--- a/src/core/devices/nm-device-ethernet.c
+++ b/src/core/devices/nm-device-ethernet.c
@@ -730,7 +730,9 @@ supplicant_iface_state_cb(NMSupplicantInterface *iface,
if (new_state == NM_SUPPLICANT_INTERFACE_STATE_DOWN) {
supplicant_interface_release(self);
- wired_auth_cond_fail(self, NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED);
+ nm_device_state_changed(NM_DEVICE(self),
+ NM_DEVICE_STATE_FAILED,
+ NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED);
return;
}