diff --git a/src/Val.cc b/src/Val.cc index 7f8d76cebc..35df899c6c 100644 --- a/src/Val.cc +++ b/src/Val.cc @@ -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) diff --git a/src/patricia.c b/src/patricia.c index f16fa6eb33..7aa265c0fb 100644 --- a/src/patricia.c +++ b/src/patricia.c @@ -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);