]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
print out raw packets we send in debug3
authorAlan T. DeKok <aland@freeradius.org>
Fri, 11 Aug 2017 13:14:33 +0000 (15:14 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 11 Aug 2017 13:15:31 +0000 (15:15 +0200)
src/modules/rlm_radius/rlm_radius_udp.c

index e40cfce03dc59f315760d52e38e88ab3bbbe14c2..f1021f6f232f4eac8ecb6e6586e105c42bf65074 100644 (file)
@@ -476,6 +476,11 @@ redo:
                goto redo;
        }
 
+       if (DEBUG_ENABLED3) {
+               RDEBUG("rlm_radius read packet");
+               fr_radius_print_hex(fr_log_fp, c->buffer, packet_len);
+       }
+
        rr = rr_track_find(c->id, c->buffer[1], NULL);
        if (!rr) {
                // @todo - debug3, print the hex value of the packet we read
@@ -1039,7 +1044,10 @@ static int conn_write(rlm_radius_udp_connection_t *c, rlm_radius_udp_request_t *
                REXDENT();
        }
 
-       // @todo - if debug >= 3, print out hex of the packet.
+       if (DEBUG_ENABLED3) {
+               RDEBUG("rlm_radius encode packet");
+               fr_radius_print_hex(fr_log_fp, c->buffer, packet_len);
+       }
 
        request->module = module_name;