[RADIATOR] using add_attr with cisco-avpairs
Kiernan McColl
kiernan at staff.iinet.net.au
Fri Jun 10 00:45:09 CDT 2011
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/21e8beeb/attachment.html
More information about the radiator
mailing list