Packet-Original-Timestamp

Бен Томпсон b.thompson at latera.ru
Fri Mar 1 19:02:09 CET 2013


2013/3/1 Arran Cudbard-Bell <a.cudbardb at freeradius.org>:
>
> On 1 Mar 2013, at 03:56, Бен Томпсон <b.thompson at latera.ru> wrote:
>
>> 2013/3/1 Бен Томпсон <b.thompson at latera.ru>:
>>> 2013/3/1 Arran Cudbard-Bell <a.cudbardb at freeradius.org>:
>>>>
>>>> On 1 Mar 2013, at 01:45, Бен Томпсон <b.thompson at latera.ru> wrote:
>>>>
>>>>> 2013/3/1 Бен Томпсон <b.thompson at latera.ru>:
>>>>>> 2013/3/1 Arran Cudbard-Bell <a.cudbardb at freeradius.org>:
>>>>>>>
>>>>>>> On 1 Mar 2013, at 00:43, Бен Томпсон <b.thompson at latera.ru> wrote:
>>>>>>>
>>>>>>>> Hello Everyone
>>>>>>>>
>>>>>>>> I have a NAS which is not sending Event-Timestamp in accounting
>>>>>>>> messages. I wondered if I could create it in unlang by subtracting
>>>>>>>> Acct-Delay-Time from Packet-Original-Timestamp. However, when I put a
>>>>>>>> reference to Packet-Original-Timestamp in the acconting setion I get
>>>>>>>> the following error :-
>>>>>>>>
>>>>>>>> Reference "${Packet-Original-Timestamp}" not found
>>>>>>>>
>>>>>>>> Am I doing something wrong?
>>>>>>>
>>>>>>> Yeah you're using a $ instead of a %.
>>>>>>
>>>>>> Many thanks.
>>>>>
>>>>> Another quick question :-
>>>>>
>>>>> ###### snip ######################
>>>>> ++? if (!Event-Timestamp)
>>>>> ? Evaluating !(Event-Timestamp) -> TRUE
>>>>> ++? if (!Event-Timestamp) -> TRUE
>>>>> ++- entering if (!Event-Timestamp) {...}
>>>>>      expand: %{Packet-Original-Timestamp} ->
>>>>> +++[request] returns updated
>>>>> ++- if (!Event-Timestamp) returns updated
>>>>> ################################
>>>>>
>>>>> It seems that Packet-Original-Timestamp does not contain anything. I
>>>>> was under the impression that it is generated automatically by
>>>>> FreeRADIUS. Is this not the case
>>>>
>>>> Packet-Original-Timestamp is only set by the detail file reader.
>>>>
>>>> Event-Timestamp should be set in accounting if you call preprocess in preacct*.
>>>>
>>>> -Arran
>>>>
>>>> * At least in 3.0
>>>
>>> OK, thanks again, I will give it a try.
>>
>> Arran
>>
>> I tried checking out the git master code, but it just hangs when
>> calling rlm_perl. This is the last line I see when running in debug
>> mode :-
>>
>> Fri Mar  1 12:46:49 2013 : Debug: (0)   modsingle[authorize]: calling
>> perl (rlm_perl) for request 0
>>
>> I need rlm_perl as part of my setup...
>>
>> Is Packet-Original-Timestamp definitely not usable in v2.x?
>
> Packet-Original-Timestamp as I explained before is *only* created by the detail reader, when it reads a packet back into the server.
>
> Event-Timestamp was not automatically created by the preprocess module in 2.2.x but is in 3.0.0.
>
> If you provide a backtrace && more debug we can probably fix the issue with rlm_perl.

Hi Arran

Many thanks again for the info. Sorry, I misunderstood your first
email. I understand now that as I am not using the detail reader, I am
barking up the wrong tree with Packet-Original-Timestamp.

I deleted the v3 version of FreeRADIUS, but I can recreate it and take
a backtrace if it will be useful.

Ben


More information about the Freeradius-Users mailing list