From 61a302ff6b2653d60e8dc32d74e7a6252c74b390 Mon Sep 17 00:00:00 2001 From: Alexander Elbs Date: Mon, 10 Oct 2022 12:38:24 +0200 Subject: [PATCH] core: use new rerequest infrastructure instead of always re-requesting secrets on authentication failure ask NMSetting if this is really needed. Currently only for the case "802.1x with TLS" this behaves differently, i.e. no re-request. --- src/core/settings/nm-agent-manager.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/settings/nm-agent-manager.c b/src/core/settings/nm-agent-manager.c index 295378bc86..6f9268b435 100644 --- a/src/core/settings/nm-agent-manager.c +++ b/src/core/settings/nm-agent-manager.c @@ -1172,8 +1172,10 @@ _con_get_try_complete_early(Request *req) } /* Do we have everything we need? */ if (NM_FLAGS_HAS(req->con.get.flags, NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM) - || ((nm_connection_need_secrets(tmp, NULL) == NULL) - && !NM_FLAGS_HAS(req->con.get.flags, NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW))) { + || (NM_FLAGS_HAS(req->con.get.flags, NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW) + && !nm_connection_need_secrets_for_rerequest(tmp)) + || (!NM_FLAGS_HAS(req->con.get.flags, NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW) + && nm_connection_need_secrets(tmp, NULL) == NULL)) { _LOGD(NULL, "(" LOG_REQ_FMT ") system settings secrets sufficient", LOG_REQ_ARG(req)); /* Got everything, we're done */