customize Post-Auth-Type REJECT

pawel_221 pawel at msconnect.pl
Mon Jan 18 10:14:56 CET 2010




Alan DeKok-2 wrote:
> 
> pawel_221 wrote:
>> And it works - when user reach transfer limit he gets correct reply
>> message,
>> but he is rejeceted anyway. It looks like "update control" doesn't work.
> 
>   You need to change the "reject" return code.  Do this by adding an
> "ok" to the config:
> 
> 
>         if (reject) {
> 		ok	# over-ride "reject"
> 
>                 update reply {
>                         Reply-Message := "You have reached your transfer
> limit. Limited bandwitch"
>             }
>                 update control {
>                         Auth-Type := "Accept"
>                         WISPr-Bandwidth-Max-Down = 131072
>                         WISPr-Bandwidth-Max-Up = 131072
>             }
>         }
> 
> 
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
> 
> 

It helped - user has "rad_recv: Access-Accept packet" but does'nt change
Bandwidth. User still have bandwitch which is assigned to his group. 
I've tried to rewrite my config and move "update control" to post-auth
section. I check in post-auth secion:
            if ( "%{reply:Reply-Message}" == "LIMITED" ) {
                update reply {
                Reply-Message := "You have reached your transfer limit.
Limited bandwidth"
                }
                update control {
                        Auth-Type := "Accept"
                        WISPr-Bandwidth-Max-Down = 131072
                        WISPr-Bandwidth-Max-Up = 131072
            }
        }

but it also doesn't change bandwitch. It still sends:
	WISPr-Bandwidth-Max-Down = 1048576
	WISPr-Bandwidth-Max-Up = 262144
But it change of course Reply-Message from "LIMITED" to "You have reached
your transfer limit. Limited bandwidth".

I debug mode I can see:

++? if ("%{reply:Reply-Message}" == "LIMITED" ) -> TRUE
++- entering if ("%{reply:Reply-Message}" == "LIMITED" ) {...}
+++[reply] returns ok
+++[control] returns ok
++- if ("%{reply:Reply-Message}" == "LIMITED" ) returns ok
Sending Access-Accept of id 151 to xxx.xxx.xxx.xxx port 59621
	Acct-Interim-Interval = 60
	Idle-Timeout = 60
	WISPr-Bandwidth-Max-Down = 1048576
	WISPr-Bandwidth-Max-Up = 262144
	Session-Timeout = 360
	Reply-Message = "You have reached your transfer limit. Limited bandwitch"

-- 
View this message in context: http://old.nabble.com/customize-Post-Auth-Type-REJECT-tp27173361p27207803.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.




More information about the Freeradius-Users mailing list