[RADIATOR] using add_attr with cisco-avpairs
Matt
mnaismith at gmail.com
Fri Jun 10 01:29:37 CDT 2011
Hi Kiernan,
As it happens I was getting warnings.. I refer to the warning in the past
tenths as your correction to my use of add_attr of course fixed it :)
Thanks for the quick reply !
Matt
Hi Matt,
Do you get any warnings about an attribute not being in the dictionary?
I think you should be adding it like this:
$rad->add_attr('cisco-avpair', "$pairName=$pairValue");
Cheers,
Kiernan
From: radiator-bounces at open.com.au [mailto:radiator-bounces at
open.com.au] On Behalf Of Matt
Sent: Friday, 10 June 2011 1:41 PM
To: radiator at open.com.au
Subject: [RADIATOR] using add_attr with cisco-avpairs
Greetings,
I have a requirement to re-write certain cisco-avpairs as they are pulled
from LDAP and returned to the LNS.
Using a PostAuthHook i'm achieving this, kind of. My problem is it looks
like its working but it isnt.
In this example I don't need to modify the particular avpair so it works
fine without the re-write. So without the PostAuthHook the avpair reply
appears as follows.
cisco-avpair = "lcp:interface-config#1=ip vrf forwarding TEST"
However ! With the PostAuthHook i get:
cisco-avpair = "lcp:interface-config#1 = ip vrf forwarding TEST"
The only difference are the spaces between the avpair name and value. I
believe this is why its failing. My LNS is a Cisco ASR 1001. There are no
spaces in my pairName or pairValue variables. It appears that its the
add_attr code thats adding the spaces.
The snippet of code in my hooks using add_attr appears as follows.
$rad->add_attr("cisco-avpair=$pairName", $pairValue);
Any tips here would be appreciated. I'm running Radiator 4.8
thanks,
Matt Naismith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open.com.au/pipermail/radiator/attachments/20110610/050cc40c/attachment.html
More information about the radiator
mailing list