Return not working in 2.2.8?

Jonathan huffelduffel at gmail.com
Tue Sep 22 19:38:03 CEST 2015


Hi,

The server version is 2.2.8;

In case the user is not found in our system and we are not doing EAP
(as EAP doesn't support webredirects) we want to redirect them to a
registration page.

authorize {
        # All other default stuff
        ...

        #  See "Authorization Queries" in sql.conf
        sql{
                notfound = 1
        }

        # Redirect unknown users to registration page
        # Do this only for captive-portal users
        if(notfound){
                # Add failsafe when eap{ ok=return } is disabled
                if(EAP-Message){
                        notfound
                }
                else{
                        # Redirect unknown user to registration page
                        register.redirect
                        # do not parse other modules in authorize section
                        return
                }
        }

I tried to add the 'return' action to make avoid processing of the
other authorize modules to save precious CPU cycles.

However, the server throws an error:

Module: Loading virtual module register.redirect
/etc/freeradius/sites-enabled/default[197]: Failed to find "return" in
the "modules" section.
/etc/freeradius/sites-enabled/default[197]: Failed to parse "return" entry.
/etc/freeradius/sites-enabled/default[193]: Failed to parse "else" subsection.
/etc/freeradius/sites-enabled/default[69]: Errors parsing authorize section.

I also tried notfound = return (as in the example of the EAP return message)

Without the 'return' action, all works, but unnecessarily parses the
other authorize modules which I want to avoid.

Not sure what i'm doing wrong here, i followed the docs from
http://freeradius.org/radiusd/man/unlang.html


More information about the Freeradius-Users mailing list