Fix failing test due to patricia change

This commit is contained in:
Tim Wojtulewicz 2021-07-23 12:26:09 -07:00
parent 083e0c5bdc
commit 802dfd80c1
2 changed files with 2 additions and 5 deletions

View file

@ -1991,7 +1991,7 @@ bool TableVal::Contains(const IPAddr& addr) const
return false;
}
return (subnets->Lookup(addr, true) != 0);
return (subnets->Lookup(addr, 128, false) != 0);
}
VectorValPtr TableVal::LookupSubnets(const SubNetVal* search)

View file

@ -763,12 +763,9 @@ patricia_search_best2 (patricia_tree_t *patricia, prefix_t *prefix, int inclusiv
fprintf (stderr, "patricia_search_best: pop %s/%d\n",
prefix_toa (node->prefix), node->prefix->bitlen);
#endif /* PATRICIA_DEBUG */
/* Zeek TODO: something about the commented out section of this if statement
* causes our test to fail. I left it commented out for now.
*/
if (comp_with_mask (prefix_tochar (node->prefix),
prefix_tochar (prefix),
node->prefix->bitlen) /*&& node->prefix->bitlen <= bitlen*/) {
node->prefix->bitlen) && node->prefix->bitlen <= bitlen) {
#ifdef PATRICIA_DEBUG
fprintf (stderr, "patricia_search_best: found %s/%d\n",
prefix_toa (node->prefix), node->prefix->bitlen);