packet dump module for debugging

Matthew Newton mcn4 at
Tue Apr 24 00:39:43 CEST 2012


I was wondering a while ago exactly what AVPs were going through
freeradius at a particular point, and it wasn't easy (that I could
find) to just dump the lot out - detail or linelog will write
certain AVPs, but not everything that's currently known. Maybe
there's a way to do it, but I missed it :)

So I hacked up a really quick module to do it. Whenever it's
called in the server, it just dumps out all pairs in request,
reply, control, and proxy lists as well if available. Made it much
easier for me to see what state the packet was in at a particular

Not submitting this necessarily for inclusion in the main tree,
but just thought I'd tidy it up and push it out in case it's of
any use to anyone else.

Example - include 'debugpacket' in post-auth, you might get
debug output containing something like the following (obviously,
you can call it as many times as you like, but after a couple or
so it gets a bit confusing!):

(0) debugpacket : ---------------------------------------------------- PACKET DEBUG -----v-v-v-v-v
(0) debugpacket : Request:
        User-Name = "bob"
        User-Password = "Test"
        NAS-IP-Address =
        NAS-Port = 0
        Message-Authenticator = 0x57c4fc026b2c741303aa0931f21b81f1
(0) debugpacket : Reply:
        Reply-Message = "Hi, come on in."
(0) debugpacket : Control:
        Cleartext-Password := "Test"
        Auth-Type = PAP
(0) debugpacket : -----------------------------------------------------------------------^-^-^-^-^
(0)   [debugpacket] = noop

I'm fully expecting there to already exist a better way - in which
case I'd be pleased to be informed :)



Matthew Newton, Ph.D. <mcn4 at>

Systems Architect (UNIX and Networks), Network Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom

For IT help contact helpdesk extn. 2253, <ithelp at>

More information about the Freeradius-Devel mailing list