[OpenSIPS-Devel] Mask 0 not allowed by permissions module
Saúl Ibarra Corretgé
saul at ag-projects.com
Wed Oct 19 14:34:56 CEST 2011
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
More information about the Devel
mailing list