]> 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 19:38:15 +0000 (20:38 +0100)
src/lib/radius.c

index f907617227d7997bdc836da4c5c729ba10007d91..d4b606c0f691d5c5893acf05e5455bcd2847867d 100644 (file)
@@ -1876,7 +1876,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;