]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't smash the authentication vector
authorAlan T. DeKok <aland@freeradius.org>
Sun, 11 Aug 2024 19:33:13 +0000 (15:33 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 11 Aug 2024 19:33:13 +0000 (15:33 -0400)
src/protocols/radius/packet.c

index 5c41f797379280cba425b7405acb7e03dba1be27..5d69f394d3e3626a9eca0f076e1a75e3be725ec1 100644 (file)
@@ -166,16 +166,6 @@ int fr_packet_sign(fr_packet_t *packet, fr_packet_t const *original,
 {
        int ret;
 
-       /*
-        *      Copy the random vector to the packet.  Other packet
-        *      codes have the Request Authenticator be the packet
-        *      signature.
-        */
-       if ((packet->code == FR_RADIUS_CODE_ACCESS_REQUEST) ||
-           (packet->code == FR_RADIUS_CODE_STATUS_SERVER)) {
-               memcpy(packet->data + 4, packet->vector, sizeof(packet->vector));
-       }
-
        ret = fr_radius_sign(packet->data, original ? original->data + 4 : NULL,
                               (uint8_t const *) secret, talloc_array_length(secret) - 1);
        if (ret < 0) return ret;