From: Arran Cudbard-Bell Date: Tue, 24 Nov 2020 15:19:01 +0000 (-0700) Subject: Fixup macros X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d2fae54a533c91fdfb1d7b9769992f2c706fe2f;p=thirdparty%2Ffreeradius-server.git Fixup macros --- diff --git a/src/modules/proto_tacacs/proto_tacacs.c b/src/modules/proto_tacacs/proto_tacacs.c index aa2de773d44..b7843917a3a 100644 --- a/src/modules/proto_tacacs/proto_tacacs.c +++ b/src/modules/proto_tacacs/proto_tacacs.c @@ -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)) { diff --git a/src/modules/proto_tacacs/proto_tacacs_acct.c b/src/modules/proto_tacacs/proto_tacacs_acct.c index 317d287238b..75b6a44ea66 100644 --- a/src/modules/proto_tacacs/proto_tacacs_acct.c +++ b/src/modules/proto_tacacs/proto_tacacs_acct.c @@ -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) diff --git a/src/modules/proto_tacacs/proto_tacacs_tcp.c b/src/modules/proto_tacacs/proto_tacacs_tcp.c index 45702852423..2616a441afc 100644 --- a/src/modules/proto_tacacs/proto_tacacs_tcp.c +++ b/src/modules/proto_tacacs/proto_tacacs_tcp.c @@ -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