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.
This commit is contained in:
Alexander Elbs 2022-10-10 12:38:24 +02:00 committed by Thomas Haller
parent 2eccb21b8e
commit 61a302ff6b
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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 */