[RADIATOR] using add_attr with cisco-avpairs

Matt mnaismith at gmail.com
Fri Jun 10 00:41:01 CDT 2011


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/065afcd8/attachment.html 


More information about the radiator mailing list