[OpenSIPS-Devel] Mask 0 not allowed by permissions module

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Jan 5 13:34:23 CET 2012


Hi Saul,

Have you done any changes on SVN regarding this?

Regards,
Bogdan

On 10/19/2011 03:34 PM, Saúl Ibarra Corretgé wrote:
> Hi,
>
> If one ones to define an ACL to allow any request to pass 0.0.0.0/0 should be used if I'm not mistaken. The permissions module has a test to prevent this, however (address.c):
>
> if (VAL_TYPE(val + 2) != DB_INT || VAL_NULL(val + 2) || VAL_INT(val + 2)<= 0 || VAL_INT(val
>             LM_ERR("invalid mask column type on row %d\n", i);
>            goto error;
> }
>
> Note the<= 0. By checking the surrounding code I didn't see an obvious reason for it not to work, so I modified it and recompiled. Worked as expected.
>
> Is there a reason for 0 not be allowed as the mask? According to the docs mask should be between 0 and 32.
>
> If there are no objections I'd like to make this change for trunk and 1.7 branches since I believe is a bugfix.
>
>
> Thanks and regards,
>
> --
> Saúl Ibarra Corretgé
> AG Projects
>
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"




More information about the Devel mailing list