libloc (0.9.17-1) unstable; urgency=medium [ Michael Tremer ] * importer: Store geofeed URLs from RIR data * importer: Add command to import geofeeds into the database * importer: Just fetch any exception from the executor * importer: Sync geofeeds * importer: Use geofeeds for country assignment * importer: Use a GIST index for networks from geofeeds * importer: Add a search index match geofeed networks quicker * importer: Fix reading Geofeeds from remarks * importer: Ensure that we only use HTTPS URLs for Geofeeds * importer: Validate country codes from Geofeeds * importer: Fix parsing gzipped content on invalid Content-Type header * po: Update translations * network: Drop an unused function to count all networks * location: Fix correct set name when family is selected * export: Raise an error when trying to export ipset for both families * Merge remote-tracking branch 'origin/geofeed' * importer: Drop method to import routing information from route servers * importer: Silently ignore any empty country codes in Geofeeds * importer: Convert country codes to uppercase from Geofeeds * importer: Skip lines we cannot decode * importer: Silence invalid country code warning * importer: Catch TimeoutError when loading Geofeeds * importer: Log any errors to the database * geofeeds: Delete any data on 404 * geofeeds: Delete any data that did not update within two weeks * geofeeds: Catch any invalid URLs * database: Log query execution time in debug mode * importer: Improve performance of AS name export query * geofeed: Parse and normalize any URLs * importer: AWS: Add country code of NZ for ap-southeast-5 * importer: Don't write AS without names into the database * importer: Decrease the log level if Spamhaus' files are empty * tree: Add flag to delete nodes * writer: Cleanup networks before writing * tree: Actually delete any deleted nodes * Merge networks before writing the database * networks: Delete networks from the tree on merge * tree: More elegantly prevent deleting the root node * network: Decreate log level when deleting networks * data: Update database to 2023-07-31 * configure: Bump version to 0.9.17 [ Temuri Doghonadze ] * po: Add Georgian translation [ Hans-Christoph Steiner ] * Add bash-completion file for the location command. [ Stefan Schantl ] * Install bash-completion files. [ Petr Písař ] * Fix string escaping in location tool -- Michael Tremer Mon, 31 Jul 2023 16:59:38 +0000 libloc (0.9.16-1) unstable; urgency=medium [ Peter Müller ] * location-importer.in: Conduct sanity checks per DROP list * location-importer.in: Add new Amazon region codes [ Michael Tremer ] * importer: Fix potential SQL command injection * configure: Fix incorrect database path * python: Export __version__ in location module * writer: Add an empty string to the stringpool * export: Fix generating file names for ipset output * database: Ship a recent default database * tests: Drop the test database and use the distributed one * database: Correct error code on verification * writer: Fix typo in signature variable * writer: Assign correct file descriptor for private keys * database: Fix check if a signature is set * configure: Drop superfluous bracket * configure: Bump version to 0.9.16 [ Petr Písař ] * Move location manual from section 8 to section 1 * Remove shebangs from Python modules * Move location manual from section 8 to section 1 in location- update.service * Install Perl files to Perl vendor directory -- Michael Tremer Sat, 29 Oct 2022 13:25:36 +0000 libloc (0.9.15-1) unstable; urgency=medium [ Peter Müller ] * Non-maintainer upload. * location-importer.in: Fix dangling variable [ Michael Tremer ] * Replace strerror(errno) with %m in format string throughout * Don't abuse errno as return code * country: Refactor storing country code and continent code * *_unref: Always expect a valid pointer * cron: Add a cronjob if systemd is not available * Check return value of fread() when reading header * configure: Replace obsolete AC_PROG_CC_STDC macro * writer: Check if stringpool has been initialized before free * database: Use MAP_PRIVATE with mmap() * database: Do not try to unmap failed mappings * database: Log any errors when mmap() fails * database: Increase page size to 64k * python: Correctly raise any errors when opening the database * database: Improve error reporting when the magic cannot be read * python: Fix errors for Database.lookup() * stringpool: Implement mmap as optional * database: Fall back when mmap() isn't available * tests: Add some simple database tests * stringpool: Drop function to find next offset * database: country: Return better error codes * python: Export DatabaseEnumerator type * tests: database: Expand test coverage * database: Refactor error handling on create * database: Break opening procedure into smaller parts * database: Refactor checking magic * database: Check if this version of libloc supports the database format * database: Map the entire database into memory as a whole * database: Read header from mapped data * hexdump: Don't try to dump any empty memory * database: Read all data from the large mmap() * database: Call madvise() to tell the kernel that we will randomly access the data * database: Encourage the compiler to inline some functions * database: Drop unused offset variable in objects * database: Drop debug line * database: Initialize r on create * tests: Add signing key to verify signatures * configure: Check for madvise * Fix compilation on MacOS X * country: Drop unused CC_LEN * tests: country: Don't crash when a country could not be found * Revert "database: Increase page size to 64k" * writer: Flush everything to disk after writing finishes * configure: Make the default database path configurable * python: Add new open() interface to easily open a database -- Michael Tremer Mon, 26 Sep 2022 15:36:44 +0000 libloc (0.9.14-1) unstable; urgency=medium [ Michael Tremer ] * Revert "configure: Require Python >= 3.9" * Make sources around that we can run tests without location installed * downloader: Fetch __version__ from C module * export: Drop using functools * verify: Show message on success * export: Don't fail when output stream isn't seekable * importer: Actually perform the Spamhaus sanity check * importer: Change download behaviour * importer: Move importing extended sources/ARIN into transaction * python: database: Return None if no description/vendor/license set * importer: Try to make parsing blocks faster * importer: Import each source individually * python: Fix missing bracket * importer: Tolerate that data might exist from other RIRs * importer: Import all sources in alphabetical order [ Peter Müller ] * location-importer: Only delete override data if we are sure to have a valid replacement * location-importer: AS names starting with "DNIC" actually are valid -- Michael Tremer Sun, 14 Aug 2022 12:24:16 +0000 libloc (0.9.13-1) unstable; urgency=medium [ Michael Tremer ] * tests: Add a simple test that lists all networks * database: Allocate subnets list only once * network: Log a more useful message on invalid prefix * network: Add more debugging output when running exclude * network: loc_network_subnets: Use correct prefix * tests: Break after exporting 1000 networks * configure: Require Python >= 3.9 * export: Enable flattening for everything * .gitignore: Ignore *.db files only in main directory * tests: Import test database * configure: Bump version to 0.9.13 -- Michael Tremer Tue, 12 Apr 2022 12:15:34 +0000 libloc (0.9.12-1) unstable; urgency=medium [ Michael Tremer ] * importer: Parse aggregated networks * database: Return something when no filter criteria is configured * importer: Correctly hande response codes from Bird * importer: Silently ignore any table headers * importer: Skip empty lines * location: Fix output of list-* commands * network: Move a couple of helper functions into headers * network: Add function that counts the bit length of an addres * network: Drop functions moved in an earlier commit * network-list: Rewrite summarize algorithm * network: Allow creating any valid networks * network: Implement bit length function for IPv4 * addresses: Implement subtraction for IPv4 * bogons: Refactor algorithms * network-list: Cap prefix length based on family * address: Correctly subtract IPv4 addresses * bogons: Reset after we have reached the end * bogons: Don't consider a network legitimate without a country code * Move all address convenience functions into their own header * address: Rename in6_addr_cmp into loc_address_cmp * address: Rename in6_addr_get_bit/in6_addr_set_bit to loc_address_* * addresses: Use loc_address_family which is now available * address: Rename increment/decrement functions and modify address in place * network: Pass prefix in native length * strings: Statically allocate all address/network strings * address: Initialize all bits of IP addresses * address: Prevent under/overflow when incrementing/decrementing * network-list: Simplify debugging output on summarize * network-list: summarize: Break when we exhausted the network range * network-list: Remove debugging line * address: Simplify functions * address: Fix decrementing IP addresses * address: Fix buffer overwrite * address: Add some simple tests * bogons: Add gaps that are only one address wide * bogons: Skip any subnets of former networks * as-list: Grow faster to avoid too many re-allocations * writer: Use AS list internally * network-list: Grow just like the AS list * country-list: Grow like AS list * writer: Use country list internally * importer: Improve performance of network export query * writer: I forgot to initalize the country list * Refactor parsing IP addresses * address: Set default prefix if none is given -- Michael Tremer Wed, 23 Mar 2022 20:11:29 +0000 libloc (0.9.11-1) unstable; urgency=medium [ Stefan Schantl ] * export: Remove prefix when exporting countries. [ Michael Tremer ] * ipset: Optimise hash table size * ipset: Fix hash type for IPv6 * ipset: Set maxelem to a fixed size * export: Conditionally enable flattening * location: Print proper error message for any uncaught exceptions * export: Allow exporting to stdout * ipset: The minimum hashsize is 64 * export: Fix filtering logic * export: Sightly refactor export logic * Bump release to 0.9.11 [ Peter Müller ] * location-importer: Fix parsing LACNIC-flavoured inetnums -- Michael Tremer Thu, 03 Mar 2022 10:44:44 +0000 libloc (0.9.10-1) unstable; urgency=medium [ Peter Müller ] * Non-maintainer upload. * location-importer: Set "is_drop" to "True" even in case of conflicts * Process LACNIC geofeed as well * location-importer: Improve regex for catching historic/orphaned data * location-importer: Replace "UK" with "GB" * location-importer.in: Add country code for AWS's "il-central-1" zone * location-importer.in: Do not make things more complicated than they are [ Michael Tremer ] * man: Add pages for top level functions * man: Add man page for loc_database_new * man: Add man pages for all loc_database_* functions * export: Make ipset files easily reloadable -- Michael Tremer Wed, 16 Feb 2022 08:53:48 +0000 libloc (0.9.9-2) unstable; urgency=medium * Fix broken Debian build -- Michael Tremer Tue, 23 Nov 2021 11:07:22 +0000 libloc (0.9.9-1) unstable; urgency=medium [ Michael Tremer ] * database: Make IP address const for lookup * configure: Enable -fno-semantic-interposition by default * network: Drop redundant loc_network_match_flag * network: Drop useless loc_network_match_asn function * stringpool: Make functions properly private * Make loc_network_tree_* functions propertly private * Remove LOC_EXPORT from loc_network_to_database_v1/loc_network_new_from_database_v1 * country: Add function that returns flags for special country * country: Make country codes beginning with X invalid * network: Make loc_network_match_country_code match special countries * network: Rename "match" functions to "matches" [ Peter Müller ] * location.txt: Improve manpage * importer.py: Import JPNIC feed as well * location-importer: Introduce auxiliary function to sanitise ASNs * location-importer.in: Add Spamhaus DROP lists -- Michael Tremer Sat, 20 Nov 2021 15:12:28 +0000 libloc (0.9.8-1) unstable; urgency=medium [ Michael Tremer ] * importer: Do not try to initialise a column that cannot be NULL with NULL * configure: Add option to enable GCC's -fanalyzer * writer: Break when a network cound not be allocated * stringpool: Allow adding empty strings * stringpool: Do not call strlen() on potential NULL pointer * stringpool: Slightly refactor initialization to help the compiler understand * stringpool: Avoid memory leak if mmap() fails * network: Move some helper functions into network.h * python: Permit passing family to database enumerator * location: Implement listing bogons * Move include files to /usr/include/libloc [ Peter Müller ] * location-importer.in: Attempt to provide meaningful AS names if organisation handles are missing * location-importer.in: Braindead me accidentally forgot a "break" statement -- Michael Tremer Tue, 21 Sep 2021 10:29:11 +0000 libloc (0.9.7-1) unstable; urgency=medium [ Valters Jansons ] * po: Update translations * systemd: Add Documentation= to location-update [ Peter Müller ] * location-importer.in: emit warnings due to unknown country code for valid networks only * location.in: fix search_networks() function call * location-importer.in: keep track of sources for networks, ASNs, and organisations * importer.py: add source information for RIR data feeds * location-importer.in: track original countries as well * location-importer.in: track original countries more pythonic * Implement an additional flag for hostile networks safe to drop * location-importer.in: Import (technical) AS names from ARIN * location-importer.in: add source column for overrides as well * location-importer.in: import additional IP information for Amazon AWS IP networks * location-import.in: optimise regular expression for filtering ASN allocations to other RIRs when parsing ARIN AS names file [ Michael Tremer ] * countries: Fix matching invalid country codes * Bump version to 0.9.7 -- Michael Tremer Fri, 09 Jul 2021 17:16:59 +0000 libloc (0.9.6-1) unstable; urgency=medium [ Michael Tremer ] * location: Fix list-networks-by-as * database: Free mmapped countries section [ Peter Müller ] * location-importer.in: fix typo * location-importer.in: delete 6to4 IPv6 space as well * location-importer.in: reduce log noise for unusable networks * location-importer.in: process unaligned IP ranges in RIR data files correctly * location-importer.in: skip networks with unknown country codes -- Michael Tremer Wed, 31 Mar 2021 14:06:00 +0100 libloc (0.9.5-1) unstable; urgency=medium * Initial release. -- Stefan Schantl Sun, 27 Oct 2019 18:55:44 +0100