From: Alan T. DeKok Date: Wed, 13 Oct 2021 00:50:35 +0000 (-0400) Subject: when we read a fake packet, mark the pairs as tainted X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=673671638ae80ff7628a7be06aa550f65481d6dc;p=thirdparty%2Ffreeradius-server.git when we read a fake packet, mark the pairs as tainted which should help the rlm_rest test cases --- diff --git a/src/bin/unit_test_module.c b/src/bin/unit_test_module.c index 6ea17b23735..f830e025ff3 100644 --- a/src/bin/unit_test_module.c +++ b/src/bin/unit_test_module.c @@ -173,6 +173,13 @@ static request_t *request_from_file(TALLOC_CTX *ctx, FILE *fp, RADCLIENT *client goto error; } + /* + * Pretend that the attributes came in "over the wire". + * + * @todo - do this only for protocol attributes, and not internal ones? + */ + fr_pair_list_tainted(&request->request_pairs); + vp = fr_pair_find_by_da(&request->request_pairs, attr_packet_type, 0); if (!vp) { fr_strerror_printf("Input packet does not specify a Packet-Type");