xlat: something like eval()? problems with avp into in another avp

Jorge Pereira jpereiran at gmail.com
Wed Sep 16 15:53:11 CEST 2015


Hi,

   I would like to know how "expand" an avp into in another avp. below my
example.

Wed Sep 16 13:37:43 2015 : Debug: (0)       policy my.captive_redirect {
Wed Sep 16 13:37:43 2015 : Debug: (0)         update {
Wed Sep 16 13:37:43 2015 : Debug: (0)           EXPAND %{My-Portal-Url}
Wed Sep 16 13:37:43 2015 : Debug: (0)              -->
http://meu-host.intra.net/integration-bus/v1/redir/start?acctSessionId=%{Acct-Session-Id}
Wed Sep 16 13:37:43 2015 : Debug: (0)           &reply:Alc-Wlan-Portal-Url
:=
http://meu-host.intra.net/integration-bus/v1/redir/start?acctSessionId=%{Acct-Session-Id}
Wed Sep 16 13:37:43 2015 : Debug: (0)         } # update = noop
Wed Sep 16 13:37:43 2015 : Debug: (0)       } # policy
alcatel.captive_redirect = noop

example: but, when calling the %{redis: ..}, they resolve everything fine.

Wed Sep 16 13:37:43 2015 : Debug: (0)     policy
mcare-redis.set_my_portal_url {
Wed Sep 16 13:37:43 2015 : Debug: (0)       if (!&My-Portal-Url) {
Wed Sep 16 13:37:43 2015 : Debug: (0)       if (!&My-Portal-Url)  -> FALSE
Wed Sep 16 13:37:43 2015 : Debug: (0)       if (&My-Portal-Url) {
Wed Sep 16 13:37:43 2015 : Debug: (0)       if (&My-Portal-Url)  -> TRUE
Wed Sep 16 13:37:43 2015 : Debug: (0)       if (&My-Portal-Url)  {
Wed Sep 16 13:37:43 2015 : Debug: %{redis_db03:HSET
%{Acct-Session-Id} My-Portal-Url "%{My-Portal-Url}"}
Wed Sep 16 13:37:43 2015 : Debug: Parsed xlat tree:
Wed Sep 16 13:37:43 2015 : Debug: xlat --> redis_db03
Wed Sep 16 13:37:43 2015 : Debug: {
Wed Sep 16 13:37:43 2015 : Debug:       literal --> HSET
Wed Sep 16 13:37:43 2015 : Debug:       attribute --> Acct-Session-Id
Wed Sep 16 13:37:43 2015 : Debug:       literal -->  My-Portal-Url "
Wed Sep 16 13:37:43 2015 : Debug:       attribute --> My-Portal-Url
Wed Sep 16 13:37:43 2015 : Debug:       literal --> "
Wed Sep 16 13:37:43 2015 : Debug: }
Wed Sep 16 13:37:43 2015 : Debug: rlm_redis (redis_db03): Reserved
connection (0)
Wed Sep 16 13:37:43 2015 : Debug:
http://meu-host.intra.net/integration-bus/v1/redir/start?acctSessionId=%{Acct-Session-Id}
Wed Sep 16 13:37:43 2015 : Debug: Parsed xlat tree:
Wed Sep 16 13:37:43 2015 : Debug: literal -->
http://meu-host.intra.net/integration-bus/v1/redir/start?acctSessionId=
Wed Sep 16 13:37:43 2015 : Debug: attribute --> Acct-Session-Id
Wed Sep 16 13:37:43 2015 : Debug: (0)         EXPAND
http://meu-host.intra.net/integration-bus/v1/redir/start?acctSessionId=%{Acct-Session-Id}
Wed Sep 16 13:37:43 2015 : Debug: (0)            -->
http://meu-host.intra.net/integration-bus/v1/redir/start?acctSessionId=AB818B000010C355F65FA1
Wed Sep 16 13:37:43 2015 : Debug: rlm_redis (redis_db03): executing the
query: "HSET AB818B000010C355F65FA1 My-Portal-Url "
http://meu-host.intra.net/integration-bus/v1/redir/start?acctSessionId=%{Acct-Session-Id}
""
Wed Sep 16 13:37:43 2015 : Debug: rlm_redis (redis_db03): Released
connection (0)
Wed Sep 16 13:37:43 2015 : Debug: (0)         EXPAND %{redis_db03:HSET
%{Acct-Session-Id} My-Portal-Url "%{My-Portal-Url}"}
Wed Sep 16 13:37:43 2015 : Debug: (0)            --> 0
Wed Sep 16 13:37:43 2015 : Debug: (0)       } # if (&My-Portal-Url)  = ok
Wed Sep 16 13:37:43 2015 : Debug: (0)     } # policy
mcare-redis.set_my_portal_url = ok

Alan, maybe a bug? :)
--
Jorge Pereira


More information about the Freeradius-Users mailing list