(RADIATOR) One attribute twice in acconting request.

Hugh Irvine hugh at open.com.au
Mon Dec 20 13:13:34 CST 2004


Hello Toomas -

There is an example of how to do this in the latest Radiator 3.11.

See "goodies/hooks.txt" towards the end of the file.

The example is for cisco-avpairs, but you should get the idea.

regards

Hugh



On 20 Dec 2004, at 20:33, Toomas Kärner wrote:

> Hi,
>
> I have not found jet a way to treat attributes that appear twice in 
> the same
> accounting request. Best result that I'm aiming at is preclienthook 
> that
> parses the string in the attribute and creates a bogus attribute that 
> I can
> log then. I have no problem writing parsing etc. but how can I point 
> to an
> attribute in an request if it's there twice? Filter-Id is twice and 
> I'd like
> to insert a bogus attribute Out-Filter-Id if one of them contains 
> "out:%"
> and with the same logic In-Filter-Id. Later on, I could just log my 
> bogus
> attributes.
>
> Trace 4 (yes, it's a Redback):
> Fri Dec 17 17:27:55 2004: DEBUG: Packet dump:
> *** Received from xx.xx.xx.xx port 1812 ....
> Code:       Accounting-Request
> Identifier: 12
> Authentic:  *Z<1><151><239>-<238>+<204><209>C<156><25>(O<8>
> Attributes:
>         User-Name = "00:08:02:95:33:1d"
>         NAS-Identifier = "Test"
>         Service-Type = Outbound-User
>         NAS-Port = 3959423172
>         RB-NAS-Real-Port = 538509615
>         NAS-Port-Type = 5
>         Acct-Reason = AAA-Load-Acct-Session-Down
>         Acct-Session-Id = "EC0000C4-41C31752"
>         Acct-Authentic = 1
>         Class = "666"
>         Acct-Status-Type = Stop
>         Acct-Input-Octets = 9099
>         Acct-Input-Gigawords = 0
>         Acct-Output-Octets = 1246
>         Acct-Output-Gigawords = 0
>         Acct-Input-Packets = 76
>         Acct-Output-Packets = 9
>         Acct-Session-Time = 42
>         RB-Acct-Input-Octets-64 = 0x238b
>         RB-Acct-Output-Octets-64 = 0x4de
>         RB-Acct-Input-Packets-64 = 0x4c
>         RB-Acct-Output-Packets-64 = 0x9
>         Filter-Id = "in:filterIn"
>         Filter-Id = "out:filterOut"
>         RB-Police-Rate = 128
>         RB-Police-Burst = 10000
>         RB-Rate-Limit-Rate = 384
>         RB-Rate-Limit-Burst = 10000
>         Session-Timeout = 83666
>         RB-Context-Name = "vr"
>         Framed-IP-Address = 213.219.97.2
>         Acct-Terminate-Cause = Session_timeout
>         Session-Error-Msg = "Session timeout"
>         Session-Error-Code = 20
>
> Rgds.
> Toomas
>
> --
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on radiator-announce at open.com.au
> To unsubscribe, email 'majordomo at open.com.au' with
> 'unsubscribe radiator' in the body of the message.
>
>

NB:

Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive 
(www.open.com.au/archives/radiator)?
Have you had a quick look on Google (www.google.com)?
Have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list