regex not evaluated?

Marlon Duksa mduksa at gmail.com
Fri Aug 7 00:52:20 CEST 2009


Hi - does anyone know why this does not work:

basic-TP    User-Password == "csetestp"
            User-Name =~ "^([aA-zZ]+)-([aA-zZ]+)$",
            Alc-Subsc-ID-Str := "%{NAS-Port-Id}",
            Alc-Subsc-Prof-Str := "%{1}",
            Alc-SLA-Prof-Str := "%{2}",
            Alc-MSAP-Serv-Id := "100",
            Alc-MSAP-Policy  := "msaps",
            Alc-Default-Router := 20.0.0.1,
            Framed-IP-Address := 20.0.0.2,
            Framed-IP-Netmask := 255.255.0.0,
            Session-Timeout := 600,
            Fall-Through = Yes
DEFAULT     NAS-Port-Id =~ "^([^:]+):"
            Alc-MSAP-Interface := "port-%{1}"


The request qoes through all lines but the Alc-Subsc-Prof-Str and
Alc-Subsc-SLA-Str  are empty. Obviously, the User-Name matches the regexpr,
therefore, those two string should have returned values of %{1} and %{2}.


This is the request:
rad_recv: Access-Request packet from host 114.0.1.1:51080, id=29, length=90
        User-Name = "basic-TP"
        User-Password = "csetestp"
        NAS-IP-Address = 1.1.1.1
        DSL-Circuit-ID = "basic-TP"
        DSL-Remote-ID = "-0"
        NAS-Port-Type = Ethernet
        NAS-Port-Id = "1/1/1:10"

This is what is returned:
Sending Access-Accept of id 29 to 114.0.1.1 port 51080
        User-Name =~ "^([aA-zZ]+)-([aA-zZ]+)$"
        Alc-Subsc-ID-Str := "1/1/1:10"
        Alc-Subsc-Prof-Str := ""
        Alc-SLA-Prof-Str := ""
        Alc-MSAP-Serv-Id := 100
        Alc-MSAP-Policy := "msaps"
        Alc-Default-Router := 20.0.0.1
        Framed-IP-Address := 20.0.0.2
        Framed-IP-Netmask := 255.255.0.0
        Session-Timeout := 600
        Alc-MSAP-Interface := "port-1/1/1"

Thanks,
Marlon.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20090806/a1b54f05/attachment.html>


More information about the Freeradius-Users mailing list