Cast type user-name

Bassem Mettichi mettichi at gmail.com
Sat Apr 16 18:50:16 UTC 2022


Thanks a lot Alan please could you give me an example for regexp that match
ipv4 and ipv
Thanks a lot

Le sam. 16 avr. 2022 à 16:44, Alan DeKok <aland at deployingradius.com> a
écrit :

> On Apr 15, 2022, at 8:30 PM, Bassem Mettichi <mettichi at gmail.com> wrote:
> >
> > Hello ,
> > Please could any one provide the unlang syntax to check if the
> > request:user-name is of type ipv4addr or ipv6addr
>
>   User-Name is a string.  You can use regular expression to see if the
> string matches an IPv4 or IPv6 address.
>
>         if (User-Name =~ /regex/) {
>                 ...
>         }
>
>   Alan DeKok.
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>


More information about the Freeradius-Users mailing list