From: Alan T. DeKok Date: Sun, 14 Apr 2024 14:31:35 +0000 (-0400) Subject: remove old code X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba78407ca239b139876dc294bee46d4a6983fa26;p=thirdparty%2Ffreeradius-server.git remove old code copied from radius, and then never updated to remove all traces of radius --- diff --git a/src/listen/bfd/proto_bfd.c b/src/listen/bfd/proto_bfd.c index 60c815da352..4c394e42517 100644 --- a/src/listen/bfd/proto_bfd.c +++ b/src/listen/bfd/proto_bfd.c @@ -22,7 +22,6 @@ * @copyright 2017 Arran Cudbard-Bell (a.cudbardb@freeradius.org) * @copyright 2016 Alan DeKok (aland@freeradius.org) */ -#include #include #include #include @@ -232,11 +231,6 @@ static int mod_decode(UNUSED void const *instance, request_t *request, uint8_t * return 0; } - /* - * Note that we don't set a limit on max_attributes here. - * That MUST be set and checked in the underlying - * transport, via a call to fr_radius_ok(). - */ if (fr_bfd_decode(request->request_ctx, &request->request_pairs, (uint8_t const *) bfd, bfd->length, client->secret, talloc_array_length(client->secret) - 1) < 0) { @@ -263,43 +257,6 @@ static int mod_decode(UNUSED void const *instance, request_t *request, uint8_t * my->vp_uint32 = tmp; } - /* - * If we're defining a dynamic client, this packet is - * fake. We don't have a secret, so we mash all of the - * encrypted attributes to sane (i.e. non-hurtful) - * values. - */ - if (!client->active) { - fr_assert(client->dynamic); - - for (vp = fr_pair_list_head(&request->request_pairs); - vp != NULL; - vp = fr_pair_list_next(&request->request_pairs, vp)) { - if (!flag_encrypted(&vp->da->flags)) { - switch (vp->vp_type) { - default: - break; - - case FR_TYPE_UINT32: - vp->vp_uint32 = 0; - break; - - case FR_TYPE_IPV4_ADDR: - vp->vp_ipv4addr = INADDR_ANY; - break; - - case FR_TYPE_OCTETS: - fr_pair_value_memdup(vp, (uint8_t const *) "", 1, true); - break; - - case FR_TYPE_STRING: - fr_pair_value_strdup(vp, "", true); - break; - } - } - } - } - if (fr_packet_pairs_from_packet(request->request_ctx, &request->request_pairs, request->packet) < 0) { RPEDEBUG("Failed decoding 'Net.*' packet"); return -1; diff --git a/src/listen/cron/proto_cron_crontab.c b/src/listen/cron/proto_cron_crontab.c index b06c51288d2..03d6dfd8cf2 100644 --- a/src/listen/cron/proto_cron_crontab.c +++ b/src/listen/cron/proto_cron_crontab.c @@ -449,11 +449,6 @@ static int mod_decode(void const *instance, request_t *request, UNUSED uint8_t * request->packet->data = talloc_zero_array(request->packet, uint8_t, 1); request->packet->data_len = 1; - /* - * Note that we don't set a limit on max_attributes here. - * That MUST be set and checked in the underlying - * transport, via a call to fr_radius_ok(). - */ (void) fr_pair_list_copy(request->request_ctx, &request->request_pairs, &inst->pair_list); /* diff --git a/src/listen/load/proto_load_step.c b/src/listen/load/proto_load_step.c index e6fd4bc0888..aeaa1220962 100644 --- a/src/listen/load/proto_load_step.c +++ b/src/listen/load/proto_load_step.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -276,11 +275,6 @@ static int mod_decode(void const *instance, request_t *request, UNUSED uint8_t * request->packet->data = talloc_zero_array(request->packet, uint8_t, 1); request->packet->data_len = 1; - /* - * Note that we don't set a limit on max_attributes here. - * That MUST be set and checked in the underlying - * transport, via a call to fr_radius_ok(). - */ (void) fr_pair_list_copy(request->request_ctx, &request->request_pairs, &inst->pair_list); /*