]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix final use of packet->vps in common_packet_debug
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 21 Jan 2021 10:43:48 +0000 (10:43 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 21 Jan 2021 10:43:48 +0000 (10:43 +0000)
src/lib/server/auth.c
src/lib/server/listen.h
src/lib/server/protocol.c
src/lib/server/protocol.h
src/modules/proto_vmps/proto_vmps_process.c

index 37a48580acacd42e106bb9ca6f83e64d1b21e743..8d5c138d581304dcd09da98776d8e242641906d8 100644 (file)
@@ -183,7 +183,7 @@ runit:
 /*
  *     Debug the packet if requested.
  */
-void common_packet_debug(request_t *request, fr_radius_packet_t *packet, bool received)
+void common_packet_debug(request_t *request, fr_radius_packet_t *packet, fr_pair_list_t *pairs, bool received)
 {
 #ifdef WITH_IFINDEX_NAME_RESOLUTION
        char if_name[IFNAMSIZ];
@@ -217,8 +217,8 @@ void common_packet_debug(request_t *request, fr_radius_packet_t *packet, bool re
                       packet->data_len);
 
        if (received) {
-               log_request_pair_list(L_DBG_LVL_1, request, NULL, &request->request_pairs, NULL);
+               log_request_pair_list(L_DBG_LVL_1, request, NULL, pairs, NULL);
        } else {
-               log_request_proto_pair_list(L_DBG_LVL_1, request, NULL, &request->request_pairs, NULL);
+               log_request_proto_pair_list(L_DBG_LVL_1, request, NULL, pairs, NULL);
        }
 }
index 266f129bb642ec92cc489a9fef496494f6367779..040abddd2cac394ded109cd15eedd81799bde4ba 100644 (file)
@@ -69,7 +69,7 @@ typedef int (*rad_listen_recv_t)(rad_listen_t *);
 typedef int (*rad_listen_send_t)(rad_listen_t *, request_t *);
 typedef int (*rad_listen_error_t)(rad_listen_t *, int);
 typedef int (*rad_listen_print_t)(rad_listen_t const *, char *, size_t);
-typedef void (*rad_listen_debug_t)(request_t *, fr_radius_packet_t *, bool received);
+typedef void (*rad_listen_debug_t)(request_t *, fr_radius_packet_t *, fr_pair_list_t *, bool received);
 typedef int (*rad_listen_encode_t)(rad_listen_t *, request_t *);
 typedef int (*rad_listen_decode_t)(rad_listen_t *, request_t *);
 
index cc2b5b4279f290cbd002561c090b9cfc45aa6aea..e61df3b5ac3a9080ce324e7262ad72e9f455838e 100644 (file)
@@ -37,7 +37,7 @@ extern "C" {
 /*
  *     Debug the packet if requested.
  */
-void common_packet_debug(request_t *request, fr_radius_packet_t *packet, bool received)
+void common_packet_debug(request_t *request, fr_radius_packet_t *packet, fr_pair_list_t *pairs, bool received)
 {
 #ifdef WITH_IFINDEX_NAME_RESOLUTION
        char if_name[IFNAMSIZ];
@@ -71,8 +71,8 @@ void common_packet_debug(request_t *request, fr_radius_packet_t *packet, bool re
                       packet->data_len);
 
        if (received || request->parent) {
-               log_request_pair_list(L_DBG_LVL_1, request, NULL, packet->vps, NULL);
+               log_request_pair_list(L_DBG_LVL_1, request, NULL, pairs, NULL);
        } else {
-               log_request_proto_pair_list(L_DBG_LVL_1, request, NULL, packet->vps, NULL);
+               log_request_proto_pair_list(L_DBG_LVL_1, request, NULL, pairs, NULL);
        }
 }
index 3900828012cc71c43d6b5536de6ec1542e9a139f..be56ed47fae79481af4434779271dcfc5fe8ca16 100644 (file)
@@ -47,7 +47,7 @@ typedef void (*rad_listen_free_t)(rad_listen_t *);
 int common_socket_parse(CONF_SECTION *cs, rad_listen_t *this);
 int common_socket_open(CONF_SECTION *cs, rad_listen_t *this);
 int common_socket_print(rad_listen_t const *this, char *buffer, size_t bufsize);
-void common_packet_debug(request_t *request, fr_radius_packet_t *packet, bool received);
+void common_packet_debug(request_t *request, fr_radius_packet_t *packet, fr_pair_list_t *pairs, bool received);
 
 /** Struct exported by a proto_* module
  *
index 403d8e5f535cf257aa85fd4dd024a246d6f200e4..0baa047353ba255c42af5900d459ecd02f525835 100644 (file)
@@ -194,7 +194,7 @@ static unlang_action_t mod_process(rlm_rcode_t *p_result, UNUSED module_ctx_t co
                        request->reply->socket.inet.src_ipaddr = request->client->src_ipaddr;
                }
 
-               if (RDEBUG_ENABLED) common_packet_debug(request, request->reply, false);
+               if (RDEBUG_ENABLED) common_packet_debug(request, request->reply, &request->reply_pairs, false);
                break;
 
        default: