]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fixup macros
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 24 Nov 2020 15:19:01 +0000 (08:19 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 26 Nov 2020 17:18:37 +0000 (10:18 -0700)
src/modules/proto_tacacs/proto_tacacs.c
src/modules/proto_tacacs/proto_tacacs_acct.c
src/modules/proto_tacacs/proto_tacacs_tcp.c

index aa2de773d44de2386f1534e69a4a3b16a41a6be0..b7843917a3ab61fefd1a8f7d27e247a0b05ba19b 100644 (file)
@@ -297,7 +297,7 @@ static int mod_decode(void const *instance, request_t *request, uint8_t *const d
                 *      Maybe the shared secret is wrong?
                 */
                if (client->active &&
-                   ((pkt->hdr.flags & FR_TACACS_FLAGS_VALUE_UNENCRYPTED) == 0) &&
+                   ((pkt->hdr.flags & FR_FLAGS_VALUE_UNENCRYPTED) == 0) &&
                    RDEBUG_ENABLED2 &&
                    ((vp = fr_pair_find_by_da(&request->request_pairs, attr_tacacs_user_name)) != NULL) &&
                    (fr_utf8_str((uint8_t const *) vp->vp_strvalue, vp->vp_length) < 0)) {
index 317d287238b5dcad30b3ac141e139dd01c0e67eb..75b6a44ea66e36267d6cf7b1baceb96bbb40dc7d 100644 (file)
@@ -110,7 +110,7 @@ static void accounting_failed(request_t *request, char const *msg)
         *      Set the status.
         */
        MEM(pair_update_reply(&vp, attr_tacacs_accounting_status) >= 0);
-       vp->vp_uint8 = FR_TACACS_ACCOUNTING_STATUS_VALUE_ERROR;
+       vp->vp_uint8 = FR_ACCOUNTING_STATUS_VALUE_ERROR;
 }
 
 static unlang_action_t mod_process(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
index 45702852423d48da21a312556f8f1f7ffe78eaae..2616a441afc75c8cbdce10e014af302b337271de 100644 (file)
@@ -170,7 +170,7 @@ static ssize_t mod_read(fr_listen_t *li, UNUSED void **packet_ctx, UNUSED fr_tim
                fr_tacacs_packet_t *pkt = (fr_tacacs_packet_t *) buffer;
 
                thread->seen_first_packet = true;
-               thread->single_connection = ((pkt->hdr.flags & FR_TACACS_FLAGS_VALUE_SINGLE_CONNECT) != 0);
+               thread->single_connection = ((pkt->hdr.flags & FR_FLAGS_VALUE_SINGLE_CONNECT) != 0);
        }
 
        /*
@@ -213,7 +213,7 @@ static ssize_t mod_write(fr_listen_t *li, UNUSED void *packet_ctx, UNUSED fr_tim
        pkt = (fr_tacacs_packet_t *) buffer;
        if (written == 0) {
                thread->stats.total_responses++;
-               if (thread->single_connection) pkt->hdr.flags |= FR_TACACS_FLAGS_VALUE_SINGLE_CONNECT;
+               if (thread->single_connection) pkt->hdr.flags |= FR_FLAGS_VALUE_SINGLE_CONNECT;
        }
 
        /*
@@ -228,7 +228,7 @@ static ssize_t mod_write(fr_listen_t *li, UNUSED void *packet_ctx, UNUSED fr_tim
         *      are only doing a single session.  In which case,
         *      return 0, which tells the caller to close the socket.
         */
-       if (((pkt->hdr.flags & FR_TACACS_FLAGS_VALUE_SINGLE_CONNECT) == 0) &&
+       if (((pkt->hdr.flags & FR_FLAGS_VALUE_SINGLE_CONNECT) == 0) &&
            (data_size + written) >= buffer_len) {
                // @todo - check status for pass / fail / error, which
                // cause the connection to be closed.  Everything else