Closed crustymonkey closed 8 years ago
It looks like this is specifically an issue with the C implementation. If I use the pure Python version, it works as expected (as far as I've tested to this point).
I have just seen the same problem. It seems to be related to the 0/0 entry.
I have - r.add("192.168.1.133/32") r.add("0.0.0.0/0") r.search_covered returns both.
If I do - r.add("192.168.1.133/32") Then r.search_covered returns an empty set.
I am not sure if I am using C or pure Python version.
It's a bug in the C implementation. I'll fix it soon.
I've created pull request 24. Please check if it works as expected.
I updated the pull request with this comment already. I can no longer repro the issue after patching so it looks like this change fixes the problem.
Thanks for the report; there should now be a py-radix==0.9.4 with the fix available in PyPI.
Below is a quick test/results that look like broken
search_covered
behavior. This is after building py-radix using the following:search_covered
in [6] should return an empty list. Note thatsearch_covering
will return the correct nodes.