]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
it helps to set the value for State
authorAlan T. DeKok <aland@freeradius.org>
Mon, 30 Jan 2023 00:27:49 +0000 (19:27 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 30 Jan 2023 00:27:49 +0000 (19:27 -0500)
src/process/tacacs/base.c

index 552e939060d0dc1a0a2c1da548c256d789208b1b..d2395323eee3f1ba01a4b1ba508c66b5a86076fa 100644 (file)
@@ -332,6 +332,9 @@ static void CC_HINT(format (printf, 4, 5)) auth_message(process_tacacs_auth_t co
        talloc_free(msg);
 }
 
+/*
+ *     Synthesize a State attribute from connection && session information.
+ */
 static int state_create(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request, bool reply)
 {
        uint8_t         buffer[12];
@@ -367,6 +370,8 @@ static int state_create(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request
        vp = fr_pair_afrom_da(ctx, attr_tacacs_state);
        if (!vp) return -1;
 
+       (void) fr_pair_value_memdup(vp, buffer, 12, false);
+
        fr_pair_append(out, vp);
 
        return 0;