Summary: | libloc-0.9.18 fails to find some ASN info | ||
---|---|---|---|
Product: | IPFire | Reporter: | Adolf Belka <adolf.belka> |
Component: | --- | Assignee: | Michael Tremer <michael.tremer> |
Status: | VERIFIED --- | QA Contact: | Adolf Belka <adolf.belka> |
Severity: | - Unknown - | ||
Priority: | - Unknown - | CC: | michael.tremer |
Version: | 2 | ||
Hardware: | unspecified | ||
OS: | Unspecified |
Description
Adolf Belka
2025-06-27 12:31:38 UTC
Which version of the database have you been testing this against? The good and bad result that I mention in the description were both done with the same database version which was -bash-5.2$ location version Fri, 27 Jun 2025 04:42:16 GMT In my earlier faultfinding I also tested out various older databases back to 2025-01-01 and got the same result. http://git.ipfire.org/?p=people/ms/libloc.git;a=commit;h=95d271bb90b4cebe81c288a95a2336aa63bac4d7 Author: Michael Tremer <michael.tremer@ipfire.org> database: Fix backtracking after no match was found at the end of the tree This is a rare bug which only appears if the tree has not been 100% optimised which might happen because it would not be worth the effort to remove all dead ends all of the time. Therefore, we could be reaching a node which is not an actual leaf but still not find our network. In that case, we will have to go backwards slightly to check if there has been a less specific match (but a match nonetheless). This was broken in commit 9e72b8a0c56403ca7d23c6a767d66038e0d63c14 when the return code for no match was changed to zero. Fixes: #13861 - libloc-0.9.18 fails to find some ASN info Reported-by: Adolf Belka <adolf.belka@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> Hello Adolf,
thank you for posting such an interesting problem. It has indeed been a problem in the lookup algorithm which terminated too early and did not perform any backtracking.
This patch should fix the problem:
> https://git.ipfire.org/?p=location/libloc.git;a=commitdiff;h=95d271bb90b4cebe81c288a95a2336aa63bac4d7
Please let me know if this fixes the problem for you, too.
I did the local build of libloc on my desktop machine again but this time with your patch also applied. Can confirm that after this both the Clamav IP's and the Archlinux one all get asn responses back. The fix patch has been sent to the dev mailing list to apply to the existing version of libloc so a new version does not have to be created. https://lists.ipfire.org/development/20250627195351.3341456-1-adolf.belka@ipfire.org/T/#t https://patchwork.ipfire.org/project/ipfire/list/?series=5007 Have tested out running location lookup with the two IP's from www.clamav.net and with the IP from archlinux.org In all cases location lookup gives the expected feedback. This verifies that the fix is in CU196 Testing. |