Module sqlippool and logs

Rafael Ganascim rganascim at gmail.com
Tue Aug 27 20:49:15 CEST 2019


Em ter, 27 de ago de 2019 às 14:43, Alan DeKok
<aland at deployingradius.com> escreveu:
>
> On Aug 27, 2019, at 12:56 PM, Rafael Ganascim <rganascim at gmail.com> wrote:
> > I can't use this approach because I need to process both the ippool modules:
> >
> >       IPV4
> >        if (control:Module-Success-Message) {
> >                linelog
>
>   Then do:
>
>                 update control {
>                         &Module-Success-Message -= ANY
>                 }

I dit it:
...
       IPV4
        if (control:Module-Success-Message) {
                linelog
                update control {
                        &Module-Success-Message -= ANY
                }
        }
        IPV6
        if (control:Module-Success-Message) {
                linelogv6
                update control {
                        &Module-Success-Message -= ANY
                }
        }
 ...


But the log message from linelog is using the first one:
(104) IPV4: EXPAND Allocated IP: %{reply:Framed-IP-Address} from
%{control:Pool-Name} (did %{Called-Station-Id} cli
%{Calling-Station-Id} port %{NAS-Port} user %{User-Name})
(104) IPV4:    --> Allocated IP: 187.x.x.x from SPF (did  cli
BRAS-31#MA56T_H23_01 atm 0/15/0/027:8.35 port 721422845 user
xxxxx at xxxxxx.xxx.xx)
(104)     [IPV4] = ok
(104)     if (control:Module-Success-Message) {
(104)     if (control:Module-Success-Message)  -> TRUE
(104)     if (control:Module-Success-Message)  {
(104) linelog: EXPAND %t %{control:Module-Success-Message}
(104) linelog:    --> Tue Aug 27 15:03:16 2019 Allocated IP: 187.x.x.x
from SPF (did  cli BRAS-31#MA56T_H23_01 atm 0/15/0/027:8.35 port
721422845 user xxxxx at xxxxxx.xxx.xx)
(104) linelog: EXPAND /var/log/radius/radius.log
(104) linelog:    --> /var/log/radius/radius.log
(104)       [linelog] = ok
(104)       update control {
(104)         &Module-Success-Message -= ANY
(104)       } # update control = noop
(104)     } # if (control:Module-Success-Message)  = ok

(104) IPV6: EXPAND Allocated IPv6PD: %{reply:Delegated-IPv6-Prefix}
from %{control:Pool-Name} (did %{Called-Station-Id} cli
%{Calling-Station-Id} port %{NAS-Port} user %{User-Name})
(104) IPV6:    --> Allocated IPv6PD: 2804:xxxxx::/56 from SPF (did
cli BRAS-31#MA56T_H23_01 atm 0/15/0/027:8.35 port 721422845 user
xxxxx at xxxxxx.xxx.xx)
(104)     [IPV6] = ok
(104)     if (control:Module-Success-Message) {
(104)     if (control:Module-Success-Message)  -> TRUE
(104)     if (control:Module-Success-Message)  {
(104) linelogv6: EXPAND %t %{control:Module-Success-Message}
(104) linelogv6:    --> Tue Aug 27 15:03:16 2019 Allocated IP:
187.x.x.x from SPF (did  cli BRAS-31#MA56T_H23_01 atm 0/15/0/027:8.35
port 721422845 user xxxxx at xxxxxx.xxx.xx)
(104) linelogv6: EXPAND /var/log/radius/radius.log
(104) linelogv6:    --> /var/log/radius/radius.log
(104)       [linelogv6] = ok
(104)       update control {
(104)         &Module-Success-Message -= ANY
(104)       } # update control = noop
(104)     } # if (control:Module-Success-Message)  = ok
(104)     [exec] = noop
(104)   } # post-auth = ok



>
>   Which deletes it.  Then, the next module can set it and use it.
>
> >        }
> >        IPV6
> >        if (control:Module-Success-Message) {
> >                linelogv6
> >        }
> >
> > My radius server is in production, so I got the debug from raddebug,
> > to prevent impacting service availability. I'm sorry for that.
>
>   I understand, but it's a pain.  This is why people should be running test systems.
>
>   i.e. *don't* play games with your production system!  Run tests!
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list