]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add Message-Authenticator to all Access-Request packets
authorAlan T. DeKok <aland@freeradius.org>
Fri, 16 Feb 2024 15:36:54 +0000 (10:36 -0500)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Mon, 8 Jul 2024 15:22:09 +0000 (16:22 +0100)
src/lib/radius.c

index 03a91469f002efb1dd3409158509b4f7c71cf503..8f1e558e44ddd57cded9467f9fe506c9eb75b38b 100644 (file)
@@ -1921,7 +1921,9 @@ int rad_encode(RADIUS_PACKET *packet, RADIUS_PACKET const *original,
         *
         *      It must be the FIRST attribute in the packet.
         */
-       if (!packet->tls && original && (original->code == PW_CODE_ACCESS_REQUEST)) {
+       if (!packet->tls && 
+           ((original && (original->code == PW_CODE_ACCESS_REQUEST)) ||
+            (packet->code == PW_CODE_ACCESS_REQUEST))) {
                seen_ma = true;
 
                packet->offset = RADIUS_HDR_LEN;