I'm trying to add an attr_rewrite rule to add an Event-Timestamp attribute to outgoing accounting requests.

I've tried this in 0.7.1, and now 0.9.3.

This attribute is listed as a 'date' type in the dictionary.
The date type looks just like an integer...  but what is the difference?

Here's what i've got in my radiusd.conf:

        attr_rewrite addEventTimestamp {
                attribute = Event-Timestamp
                searchfor = NULL
                searchin = packet
                replacewith = "%l"
                new_attribute = yes
                max_matches = 1
                append = no
        }



When I send an accounting request, this module is called, and then segfaults.

Here's what debug says:

rad_recv: Accounting-Request packet from host 216.187.77.178:32804, id=159, length=174
NAS-Port-Type = Virtual
Service-Type = Framed-User
Framed-Protocol = PPP
Acct-Session-Id = "445864c128c9a6f5989600ea2d05f10b"
Acct-Status-Type = Stop
Acct-Authentic = RADIUS
NAS-Identifier = "FP_44"
User-Name = "some user name"
NAS-IP-Address = XXX.XXX.XXX.XXX
Called-Station-Id = "00:00:00:00:00:00"
Acct-Input-Octets = 0
Acct-Output-Octets = 0
Framed-IP-Address = 10.0.1.254
Calling-Station-Id = "00:00:00:00:00:00"
modcall: entering group preacct for request 0
modcall[preacct]: module "preprocess" returns noop for request 0
radius_xlat: '1070138162'
Segmentation fault




I've done some digging on this, and if I modify the dictionary entry for Event-Timestamp to integer, the segfaults go away.

Also, gdb says this is dying on line 344 of rlm_attr_rewrite.c, which is a debug line.

So my questions are: how are dates different from integers?
And how are they treated differently than integers?

Thanks,
James




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

Reply via email to