]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
process/eap_psk: find Password.PSK with the nested pair search developer/arr2036
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 3 Aug 2026 23:49:30 +0000 (17:49 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 3 Aug 2026 23:49:30 +0000 (17:49 -0600)
Password.PSK is a child of the Password container pair, so the
top-level fr_pair_find_by_da() never saw the pair policy had just
added, and every authentication was discarded with "No
control.Password.PSK".  The old module used password_find(), which
walks the tree.

src/process/eap_psk/base.c

index f5997225b3cb345e3258922a1989e7758ed22666..78c65f2ea65775a0b4eebf009165cd1a2836360b 100644 (file)
@@ -359,7 +359,7 @@ static unlang_action_t resume_recv_identity_response(unlang_result_t *p_result,
         *      that identity probing is not possible; policy may override
         *      with reply.Packet-Type := ::Failure.
         */
-       known_good = fr_pair_find_by_da(&request->control_pairs, NULL, attr_psk_password);
+       known_good = fr_pair_find_by_da_nested(&request->control_pairs, NULL, attr_psk_password);
        if (!known_good) {
                RDEBUG2("No control.Password.PSK for Identity \"%pV\"",
                        fr_box_strvalue_len((char const *) session->id_p, session->id_p_len));