value replacement

Jorge Pereira jpereiran at gmail.com
Mon Jul 13 22:03:38 CEST 2015


Hi,

    I have the variable.

ADSL-Agent-Circuit-Id = 0x35303a33393a35353a30643a31613a6134*00*
4a4f5247452d53534944*00*ok

And I am looking for some way to replace the '00' for ';' and transform in
a String. Currently, I am doing:

Mon Jul 13 19:06:23 2015 : Debug: (5)       if (!&Called-Station-Id ||
&Called-Station-Id == "" || &Called-Station-Id == "00:00:00:00:00:00")  {
Mon Jul 13 19:06:23 2015 : Debug: (5)         if (&ADSL-Agent-Circuit-Id) {
Mon Jul 13 19:06:23 2015 : Debug: (5)         if (&ADSL-Agent-Circuit-Id)
 -> TRUE
Mon Jul 13 19:06:23 2015 : Debug: (5)         if (&ADSL-Agent-Circuit-Id)  {
Mon Jul 13 19:06:23 2015 : Debug: (5)           update {
Mon Jul 13 19:06:23 2015 : Debug: (5)             EXPAND
%{string:&ADSL-Agent-Circuit-Id}
Mon Jul 13 19:06:23 2015 : Debug: (5)                -->
ca:fe:ca:fe:00:01\000JORGE-SSID\000ok
Mon Jul 13 19:06:23 2015 : Debug: (5)             *&request:Called-Station-Id
:= ca:fe:ca:fe:00:01*
Mon Jul 13 19:06:23 2015 : Debug: (5)           } # update = noop
Mon Jul 13 19:06:23 2015 : Debug: (5)         } # if
(&ADSL-Agent-Circuit-Id)  = noop

Any suggestion will be great.
--
Jorge Pereira


More information about the Freeradius-Users mailing list