How to get client IP address/target port in python code

Dmitriy Golubev golubev.dmitriy at gmail.com
Wed May 8 18:14:34 CEST 2019


Thank you very much

On Wed, May 8, 2019 at 3:38 PM Alan DeKok <aland at deployingradius.com> wrote:
>
> On May 8, 2019, at 8:29 AM, Dmitriy Golubev <golubev.dmitriy at gmail.com> wrote:
> > Thank you for your reply. When I post this question I found 2 things:
> > 1. This code working:
> >  update request {
> >                &Packet-Src-IP-Address = "%{Packet-Src-IP-Address}"
> >                &Packet-Dst-Port = "%{Packet-Dst-Port}"
> >            }
> > Is it correct? In your code I see that you don't use '&', don't expand
> > attribute value
>
>   Sure.  My example was a quick response.  The above should work.
>
> > and use fake attribute name instead of real one.
>
>   The issue there is that Packet-Src-IP-Address is a virtual attribute, with certain behaviour.  The above might work, but it may also have side effects.  I prefer to do something that I *know* works.
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list