Dan M wrote:
>
> Is it possible to specify my whitelist in IP/netmask or IP/CIDR format?
> I have two /25s, and would rather not have to provide all those IP
> addresses explicitly.
Per a discussion on the list about 3 hours ago:
> Rafael Capovilla wrote:
> yep we need to change this, actually it will only accept cidrs /8 /16 /24
> /32, if you want to manually fix this issue edit src/shared/validate_op.c and
> insert /25 there, something like:
>
> change this:
> /* The CIDR can onlu be from 8,16,24 to 32 */
> if((cidr != 8) && (cidr != 16) && (cidr != 24) && (cidr != 32))
> {
> return(0);
> }
> to this:
> /* The CIDR can onlu be from 8,16,24 to 32 */
> if((cidr != 8) && (cidr != 16) && (cidr != 24) && (cidr != 32) &&
> (cidr != 25 ))
> {
> return(0);
> }
>
> and this:
> else if(cidr && (cidr == 24))
> {
> snprintf(ip_address, ip_address_size, ".%d.%d.%d.",
> ip_parts[0],
> ip_parts[1],
> ip_parts[2]);
> }
> /* Returning success */
> return(1);
> }
> to this:
> else if(cidr && (cidr == 24))
> {
> snprintf(ip_address, ip_address_size, ".%d.%d.%d.",
> ip_parts[0],
> ip_parts[1],
> ip_parts[2]);
> }
> else if(cidr && (cidr == 25))
> {
> snprintf(ip_address, ip_address_size, ".%d.%d.%d.",
> ip_parts[0],
> ip_parts[1],
> ip_parts[2]);
> }
> /* Returning success */
> return(1);
> }
--
-dave