Validate netmask in traffic_selector_create_from_subnet

Fixes #216.
This commit is contained in:
Tobias Brunner
2012-08-13 13:46:19 +02:00
parent 36a3981d47
commit 305d98b780
@@ -757,6 +757,7 @@ traffic_selector_t *traffic_selector_create_from_subnet(host_t *net,
}
from = net->get_address(net);
memcpy(this->from, from.ptr, from.len);
netbits = min(netbits, this->type == TS_IPV4_ADDR_RANGE ? 32 : 128);
calc_range(this, netbits);
if (port)
{