From: Alan T. DeKok Date: Fri, 27 Oct 2017 16:14:29 +0000 (-0400) Subject: Revert "add counters by packet code" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b87c3e9e8e0440443e0950fdb5d4371c2e4e21c7;p=thirdparty%2Ffreeradius-server.git Revert "add counters by packet code" This reverts commit 2b75a31a05de9c6160b493dc60fb29ec141ec332. in the end, this belongs elsewhere --- diff --git a/src/modules/proto_radius/proto_radius_udp.c b/src/modules/proto_radius/proto_radius_udp.c index eb9c0b831c1..7eac9299a56 100644 --- a/src/modules/proto_radius/proto_radius_udp.c +++ b/src/modules/proto_radius/proto_radius_udp.c @@ -71,8 +71,6 @@ typedef struct { fr_stats_t stats; //!< statistics for this socket - uint64_t count[FR_MAX_PACKET_CODE]; //!< count of packets sent - uint32_t priorities[FR_MAX_PACKET_CODE]; //!< priorities for individual packets } proto_radius_udp_t; @@ -326,11 +324,6 @@ static ssize_t mod_read(void *instance, void **packet_ctx, fr_time_t **recv_time address.code = buffer[0]; address.id = buffer[1]; - /* - * Count how many of this packet we received. - */ - inst->count[buffer[0]]++; - tracking_status = fr_radius_tracking_entry_insert(&track, inst->ft, buffer, fr_time(), &address); switch (tracking_status) { case FR_TRACKING_ERROR: @@ -429,9 +422,6 @@ static ssize_t mod_write(void *instance, void *packet_ctx, * sometimes we want to NOT send a reply... */ if (buffer_len >= 20) { - rad_assert(buffer[0] < FR_MAX_PACKET_CODE); - inst->count[buffer[0]]++; - data_size = udp_send(inst->sockfd, buffer, buffer_len, 0, &address->dst_ipaddr, address->dst_port, address->if_index,