Please look at my nas_ident passthough patch.

Matthew Schumacher matt.s at
Mon Oct 15 07:14:08 CEST 2007


In my freeradius installation I make some decisions based on what the
NAS identifies itself as in the nas-identifier attribute.  One of these
decisions is which accounting database to use.  This has been causing
problems for me since the session_zap function is called when we get two
start messages in a row.  The purpose of the function makes perfect
sense: to end the old session so that multiple login detection works,
but the problem is that the nas-identifier attribute isn't translated
though to the stop message like the username or the nas-ip-Address so it
gets logged to the wrong accounting database because there isn't a
nas-identifier to match on.

The solution is to pass the NAS-Identifier attribute though to the
session_zap function and have it output to the accounting modules
instead of simply leaving it null.

I the attached patch to do this and it works, except my radius server
has become less than stable.  It crashes here and there, but I can't
figure out why.  I'm not much of a C programmer so I'm hoping that
someone on the list can look at my patch and point out what I did wrong.
 I suspect it's a typing issue or something.

Also, it would be great if the developers would consider this for a
production version since passing though the NAS-Identifier won't break
or affect anything currently running, but offers the flexibility of
changing the Session-Type based on matching something in the

Thanks to any that can help,
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nas_ident_session_zap_passthough.diff
URL: <>

More information about the Freeradius-Devel mailing list