]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
send a 1 byte NAK back
authorAlan T. DeKok <aland@freeradius.org>
Thu, 15 Feb 2018 17:45:30 +0000 (12:45 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 15 Feb 2018 17:45:30 +0000 (12:45 -0500)
src/lib/io/worker.c
src/modules/proto_radius/proto_radius.c

index 78f22ffc0583b201777eb4208ac37d5bab4c3141..aa8dc823c71d5b07e6c139614bbf999878108778 100644 (file)
@@ -623,7 +623,7 @@ static void fr_worker_max_request_time(UNUSED fr_event_list_t *el, UNUSED struct
                /*
                 *      Tell the network side that this request is done.
                 */
-               fr_worker_send_reply(worker, request, 0);
+               fr_worker_send_reply(worker, request, 1);
        }
 
        if (!worker->num_active) worker_reset_timer(worker);
index 586cb17dec3bb45995af7cf43342161a2c4cad54..fedc164b8541ccd5d73bd56f62efe51cd225071f 100644 (file)
@@ -254,6 +254,14 @@ static ssize_t mod_encode(void const *instance, REQUEST *request, uint8_t *buffe
        proto_radius_t const *inst = talloc_get_type_abort_const(instance, proto_radius_t);
        RADCLIENT *client;
 
+       /*
+        *      The packet timed out.  Tell the network side that the packet is dead.
+        */
+       if (buffer_len == 1) {
+               buffer[0] = 1;
+               return 1;
+       }
+
        /*
         *      If the app_io encodes the packet, then we don't need
         *      to do that.