Fixed insertion of nested subnets.

When inserting, existance of the given subnet is checked using exact
matching instead of longest prefix matching. Before, inserting a subnet
would have updated the subnet item, which is the longest prefix of the
inserted subnet, if present.
This commit is contained in:
Jan Grashoefer 2016-06-22 21:14:06 +02:00
parent 1412de1798
commit df5d9adfb4
3 changed files with 9 additions and 7 deletions

View file

@ -393,7 +393,7 @@ function insert(item: Item)
local net = to_subnet(item$indicator);
if ( have_full_data )
{
if ( net !in data_store$subnet_data )
if ( !check_subnet(net, data_store$subnet_data) )
data_store$subnet_data[net] = table();
else
is_new = F;