[sr-dev] [permissions module] allow_source_address_group() drops the request if it returns 0

Iñaki Baz Castillo ibc at aliax.net
Mon Feb 8 23:35:04 CET 2010


El Lunes, 8 de Febrero de 2010, Juha Heinanen escribió:
> Iñaki Baz Castillo writes:
>  > I do "$avp(i:10) = allow_source_address_group()" for a request whose
>  > source address matches a row in "address" table with "grp=0". I expect
>  > that allow_source_address_group() would return 0.
> 
> i checked the code and it returns the number of the group.  if group
> happens to be zero, it returns zero, which exists the script.  i need to
> disallow group number 0 and document it.

But why is not 0 a valid group? why does 0 exist the script? it's just a 
return value, does any script function returning 0 ends the script?


> so the "fix" is to use some other group number that zero.

Yes, I didn't want to use group 0, it was a provisioning error but such error 
found out the issue :)


-- 
Iñaki Baz Castillo <ibc at aliax.net>



More information about the sr-dev mailing list