]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
if there's no Error-Cause, add one in
authorAlan T. DeKok <aland@freeradius.org>
Sat, 1 Nov 2025 19:20:26 +0000 (15:20 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 1 Nov 2025 19:24:21 +0000 (15:24 -0400)
src/modules/rlm_radius/bio.c

index 960a4b2968fdce76ac7b655d414d7ba09d3f59e1..a41fe7ce05a43502756f522514f5bcfaeec08260 100644 (file)
@@ -2135,6 +2135,13 @@ static void request_demux(UNUSED fr_event_list_t *el, trunk_connection_t *tconn,
                case FR_RADIUS_CODE_PROTOCOL_ERROR:
                        protocol_error_reply(u, h);
                        fr_pair_delete_by_da(&request->reply_pairs, NULL, attr_original_packet_code);
+
+                       vp = fr_pair_find_by_da(&request->reply_pairs, NULL, attr_error_cause);
+                       if (!vp) {
+                               MEM(vp = fr_pair_afrom_da(request->reply_ctx, attr_error_cause));
+                               vp->vp_uint32 = FR_ERROR_CAUSE_VALUE_PROXY_PROCESSING_ERROR;
+                               fr_pair_append(&request->reply_pairs, vp);
+                       }
                        break;
 
                default: