Hi!
> Really didn't notice that, happened couple of times, wonder why pppd
> sends 2 acct-starts and sometimes with different session IDs.
> Sorry to report this as it ain't a bug then, and thanks for the fast
> reply.

Yes, problem in pppd's radius plug-in.


Acct-Session-Id generated as
strncpy(rstate.session_id, rc_mksid(), sizeof(rstate.session_id));

in radius_acct_start() function.

rc_mksid defined in <pppd-source-root>/pppd/plugins/radius/radiusclient/lib/util.c as

rc_mksid (void)
{
  static char buf[14];
  sprintf (buf, "%08lX%04X", (unsigned long int) time (NULL), (unsigned int) get
pid ());
}

i.e. when radius server don't answer to Acct-Start request pppd
repeat it and generate another request Acct-Start, i.e. execute
radius_acct_start() one more.

so, i think, it's right to move line

strncpy(rstate.session_id, rc_mksid(), sizeof(rstate.session_id));

from radius_acct_start() function to radius_init(), so rc_mksid()
will called once.


Mike.

> On Tue, 2003-06-17 at 14:54, Chris Parker wrote:
>> At 02:24 PM 6/17/2003 +0100, Manuel Sousa wrote:
>> >Hi, all
>> >
>> >I've been using freeradius and noticed that sometimes the
>> >Acct-Unique-Session-ID gave me different values for the same inputs.
>> >A partial output of radiusd -X is:
>> >
>> >rlm_acct_unique: Hashing 'Acct-Session-Id = "3EEF21621014",User-Name =
>> >"noc"'
>> >rlm_acct_unique: Acct-Unique-Session-ID = "889e46aba4217ad4".
>> >
>> >rlm_acct_unique: Hashing 'Acct-Session-Id = "3EEF21631014",User-Name =
>> >"noc"'
>> >rlm_acct_unique: Acct-Unique-Session-ID = "6836c775ae8a6c48".
>> >
>> >Wonder if anyone else experienced the same problem. I'm using
>> >freeradius-0.8.1.
>> 
>> Look closer at the Acct-Session-Id, particulary the 8th position.  Your
>> first line has a '2', your second line has a '3'.  They are not the same,
>> hence the hash result is not the same.



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to