]> git.ipfire.org Git - people/ms/libloc.git/log
people/ms/libloc.git
3 years agoresolv: Silence compiler warning about unused variable
Michael Tremer [Wed, 13 May 2020 20:49:57 +0000 (20:49 +0000)] 
resolv: Silence compiler warning about unused variable

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoDebian: Require lightwight python development packages
Stefan Schantl [Tue, 12 May 2020 11:52:21 +0000 (13:52 +0200)] 
Debian: Require lightwight python development packages

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoMakefile.am: Specify CC and LD when compiling perl module.
Stefan Schantl [Tue, 12 May 2020 15:07:04 +0000 (17:07 +0200)] 
Makefile.am: Specify CC and LD when compiling perl module.

This fixes the issues when cross compiling libloc and the perl binding.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agolocation-importer: DELETE multicast and "reserved for future usage" address space
Peter Müller [Wed, 13 May 2020 19:33:54 +0000 (19:33 +0000)] 
location-importer: DELETE multicast and "reserved for future usage" address space

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agolocation-importer: DELETE "current network" address space
Peter Müller [Wed, 13 May 2020 19:33:32 +0000 (19:33 +0000)] 
location-importer: DELETE "current network" address space

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agolocation-importer: DELETE other unroutable IPv4 networks
Peter Müller [Wed, 13 May 2020 19:33:13 +0000 (19:33 +0000)] 
location-importer: DELETE other unroutable IPv4 networks

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agolocation-importer: DELETE local loopback address space
Peter Müller [Wed, 13 May 2020 19:32:51 +0000 (19:32 +0000)] 
location-importer: DELETE local loopback address space

This should never appear in public BGP data, but since people tend to do
really strange things on the interent, it's better to delete 127.0.0.0/8
data, just in case.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agolocation-importer: Some routers omit /24 for IPv4
Michael Tremer [Wed, 13 May 2020 19:50:22 +0000 (19:50 +0000)] 
location-importer: Some routers omit /24 for IPv4

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agolocation-query: Print all information we have
Michael Tremer [Wed, 13 May 2020 19:50:07 +0000 (19:50 +0000)] 
location-query: Print all information we have

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Use override flags when exporting the database
Michael Tremer [Wed, 13 May 2020 17:40:58 +0000 (17:40 +0000)] 
python: Use override flags when exporting the database

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Use closest match for countries
Michael Tremer [Wed, 13 May 2020 17:30:05 +0000 (17:30 +0000)] 
python: Use closest match for countries

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Use overridden AS name when possible
Michael Tremer [Wed, 13 May 2020 17:27:22 +0000 (17:27 +0000)] 
python: Use overridden AS name when possible

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Implement writing database content to file
Michael Tremer [Wed, 13 May 2020 17:20:25 +0000 (17:20 +0000)] 
python: Implement writing database content to file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Implement importing override files into the database
Michael Tremer [Wed, 13 May 2020 17:19:31 +0000 (17:19 +0000)] 
python: Implement importing override files into the database

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Permit passing an empty private key
Michael Tremer [Wed, 13 May 2020 16:38:38 +0000 (16:38 +0000)] 
python: Permit passing an empty private key

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agolocation-query: Add command to dump the whole database
Michael Tremer [Wed, 13 May 2020 16:38:09 +0000 (16:38 +0000)] 
location-query: Add command to dump the whole database

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoFix searching with an empty string
Michael Tremer [Wed, 13 May 2020 16:37:15 +0000 (16:37 +0000)] 
Fix searching with an empty string

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Implement importing BGP announcements from route servers
Michael Tremer [Wed, 13 May 2020 15:06:02 +0000 (15:06 +0000)] 
python: Implement importing BGP announcements from route servers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Drop unused list of invalid IP addresses
Michael Tremer [Wed, 13 May 2020 11:21:23 +0000 (11:21 +0000)] 
python: Drop unused list of invalid IP addresses

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Drop importing autnums from extended sources
Michael Tremer [Tue, 12 May 2020 16:44:20 +0000 (16:44 +0000)] 
python: Drop importing autnums from extended sources

There are 1:N mappings in there and we lack any additional context to
resolve them.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Parse classic RIR data in one transaction and aggregate asnums
Michael Tremer [Tue, 12 May 2020 15:58:53 +0000 (15:58 +0000)] 
python: Parse classic RIR data in one transaction and aggregate asnums

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Import extended WHOIS data
Michael Tremer [Tue, 12 May 2020 14:57:51 +0000 (14:57 +0000)] 
python: Import extended WHOIS data

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Import classic RIR importer from database repository
Michael Tremer [Tue, 12 May 2020 13:20:42 +0000 (13:20 +0000)] 
python: Import classic RIR importer from database repository

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Add database driver for PostgreSQL
Michael Tremer [Tue, 12 May 2020 11:42:54 +0000 (11:42 +0000)] 
python: Add database driver for PostgreSQL

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Import downloader from database repository
Michael Tremer [Tue, 12 May 2020 11:16:14 +0000 (11:16 +0000)] 
python: Import downloader from database repository

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Add scaffolding for an importer tool
Michael Tremer [Tue, 12 May 2020 10:11:34 +0000 (10:11 +0000)] 
python: Add scaffolding for an importer tool

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Move common i18n code into python module
Michael Tremer [Tue, 12 May 2020 10:04:50 +0000 (10:04 +0000)] 
python: Move common i18n code into python module

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Move common logging code into module
Michael Tremer [Tue, 12 May 2020 10:01:59 +0000 (10:01 +0000)] 
python: Move common logging code into module

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Expend VERSION at build time
Michael Tremer [Tue, 12 May 2020 10:00:42 +0000 (10:00 +0000)] 
python: Expend VERSION at build time

This is now easier than importing __version__ from the
C module.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agopython: Move C module to make space for some native python code
Michael Tremer [Tue, 12 May 2020 09:49:35 +0000 (09:49 +0000)] 
python: Move C module to make space for some native python code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agolocation-exporter: Fix incorrect logger name
Michael Tremer [Tue, 12 May 2020 08:53:25 +0000 (08:53 +0000)] 
location-exporter: Fix incorrect logger name

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoTests: Disable testing for valid signature
Stefan Schantl [Mon, 11 May 2020 14:38:19 +0000 (16:38 +0200)] 
Tests: Disable testing for valid signature

Testing for a valid database signature currently fails and breaks
the entire build process.

At a later time this very easy can be recovered by reverting this
commit.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 years agoDebian: Add missing build dependencies.
Stefan Schantl [Sat, 9 May 2020 18:19:36 +0000 (20:19 +0200)] 
Debian: Add missing build dependencies.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agotest-database: Remove signature checks
Michael Tremer [Thu, 12 Dec 2019 13:34:21 +0000 (13:34 +0000)] 
test-database: Remove signature checks

These are performed in an extra test now

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agowriter: Erase the padding
Michael Tremer [Thu, 12 Dec 2019 13:18:51 +0000 (13:18 +0000)] 
writer: Erase the padding

We should not leak any data from the stack into the
database and this makes debugging easier, too.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoLog blocks that are being fed into the signature
Michael Tremer [Thu, 12 Dec 2019 13:13:31 +0000 (13:13 +0000)] 
Log blocks that are being fed into the signature

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agowriter: Put whole header into the hash instead of only the first 8 bytes
Michael Tremer [Thu, 12 Dec 2019 13:02:44 +0000 (13:02 +0000)] 
writer: Put whole header into the hash instead of only the first 8 bytes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agotest-signature: Fix path to key
Michael Tremer [Thu, 12 Dec 2019 12:52:41 +0000 (12:52 +0000)] 
test-signature: Fix path to key

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoLog the signature in debug mode
Michael Tremer [Thu, 12 Dec 2019 12:47:28 +0000 (12:47 +0000)] 
Log the signature in debug mode

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agodatabase: Catch any errors from EVP_DigestVerify_Update()
Michael Tremer [Thu, 12 Dec 2019 12:16:19 +0000 (12:16 +0000)] 
database: Catch any errors from EVP_DigestVerify_Update()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agotest: Add test to check that invalid signatures do not validate
Michael Tremer [Thu, 12 Dec 2019 12:08:53 +0000 (12:08 +0000)] 
test: Add test to check that invalid signatures do not validate

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoperl: Add get_continent_code()
Stefan Schantl [Wed, 11 Dec 2019 10:38:14 +0000 (11:38 +0100)] 
perl: Add get_continent_code()

This function allows to get the continent code by a given country code.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agodatabase: Correctly handle error codes from OpenSSL
Michael Tremer [Wed, 11 Dec 2019 11:21:05 +0000 (11:21 +0000)] 
database: Correctly handle error codes from OpenSSL

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-downloader: Add command to verify the downloaded database manually
Michael Tremer [Tue, 10 Dec 2019 18:53:21 +0000 (18:53 +0000)] 
location-downloader: Add command to verify the downloaded database manually

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoInstall databases to /var/lib/location
Michael Tremer [Tue, 10 Dec 2019 18:09:38 +0000 (18:09 +0000)] 
Install databases to /var/lib/location

This data is being modified and should therefore go to
/var/lib instead of /usr/share.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoImport our public signing key
Michael Tremer [Tue, 10 Dec 2019 18:09:22 +0000 (18:09 +0000)] 
Import our public signing key

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-downloader: Exit with 3 when the database was already up to date
Michael Tremer [Mon, 9 Dec 2019 20:15:58 +0000 (20:15 +0000)] 
location-downloader: Exit with 3 when the database was already up to date

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-exporter: Accept A1, A2, A3 as compat country codes
Michael Tremer [Mon, 9 Dec 2019 20:09:36 +0000 (20:09 +0000)] 
location-exporter: Accept A1, A2, A3 as compat country codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-exporter: Allow exporting by family
Stefan Schantl [Sun, 8 Dec 2019 10:11:56 +0000 (11:11 +0100)] 
location-exporter: Allow exporting by family

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-query: Translate family only when it is set
Michael Tremer [Mon, 9 Dec 2019 17:08:59 +0000 (17:08 +0000)] 
location-query: Translate family only when it is set

Fixes: #12253
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agodebian: Install location-exporter
Stefan Schantl [Fri, 6 Dec 2019 12:50:29 +0000 (13:50 +0100)] 
debian: Install location-exporter

This binary has no manpage yet, so lintian will provide a
warning of the non existing manpage.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-exporter: Uncomment accidentially commented line
Michael Tremer [Thu, 5 Dec 2019 17:20:23 +0000 (17:20 +0000)] 
location-exporter: Uncomment accidentially commented line

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-export: Validate country codes
Michael Tremer [Thu, 5 Dec 2019 15:47:16 +0000 (15:47 +0000)] 
location-export: Validate country codes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-exporter: ipset: Add line break after header
Michael Tremer [Thu, 5 Dec 2019 15:38:34 +0000 (15:38 +0000)] 
location-exporter: ipset: Add line break after header

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-exporter: Fix syntax errors for nftables export
Michael Tremer [Thu, 5 Dec 2019 15:37:26 +0000 (15:37 +0000)] 
location-exporter: Fix syntax errors for nftables export

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoperl: Make verify() a function on the database
Michael Tremer [Thu, 5 Dec 2019 15:34:06 +0000 (15:34 +0000)] 
perl: Make verify() a function on the database

This makes the API similar to the Python version

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-query: Do not validate database every time
Michael Tremer [Thu, 5 Dec 2019 14:54:29 +0000 (14:54 +0000)] 
location-query: Do not validate database every time

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-exporter: New script to convert database into compatible formats
Michael Tremer [Thu, 5 Dec 2019 14:48:00 +0000 (14:48 +0000)] 
location-exporter: New script to convert database into compatible formats

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-query: Allow filtering networks by family
Michael Tremer [Fri, 29 Nov 2019 19:44:25 +0000 (19:44 +0000)] 
location-query: Allow filtering networks by family

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-downloader: Verify the database after download
Michael Tremer [Fri, 29 Nov 2019 19:16:05 +0000 (19:16 +0000)] 
location-downloader: Verify the database after download

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoperl: Verify database when it is being opened
Stefan Schantl [Fri, 29 Nov 2019 19:01:45 +0000 (19:01 +0000)] 
perl: Verify database when it is being opened

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agodatabase: Benchmark time it takes to verify the signature
Michael Tremer [Fri, 29 Nov 2019 18:56:25 +0000 (18:56 +0000)] 
database: Benchmark time it takes to verify the signature

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoImplement signing/verifying databases
Michael Tremer [Thu, 28 Nov 2019 15:03:16 +0000 (15:03 +0000)] 
Implement signing/verifying databases

Databases can now carry a builtin signature which can be verified
when the database is being loaded.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agodatabase: Add scaffolding for checking signatures
Michael Tremer [Tue, 26 Nov 2019 22:29:05 +0000 (22:29 +0000)] 
database: Add scaffolding for checking signatures

The added function computes a SHA512 hash of the database
file where the signature is cleared.

The actual cryptographic check of the signature is
not implemented, yet.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoconfigure: Actually pass detected libraries over to make
Michael Tremer [Tue, 26 Nov 2019 21:41:52 +0000 (21:41 +0000)] 
configure: Actually pass detected libraries over to make

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoLink against OpenSSL
Michael Tremer [Tue, 26 Nov 2019 16:50:47 +0000 (16:50 +0000)] 
Link against OpenSSL

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoMakefile: Cleanup Debian tarball
Michael Tremer [Tue, 26 Nov 2019 16:38:01 +0000 (16:38 +0000)] 
Makefile: Cleanup Debian tarball

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agodatabase: Log error when network ID is out of range
Michael Tremer [Tue, 26 Nov 2019 16:35:53 +0000 (16:35 +0000)] 
database: Log error when network ID is out of range

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agodebian: Ignore all temporary files
Michael Tremer [Tue, 26 Nov 2019 13:51:21 +0000 (13:51 +0000)] 
debian: Ignore all temporary files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agodebian: Add command to build Debian packages easily
Michael Tremer [Tue, 26 Nov 2019 13:50:57 +0000 (13:50 +0000)] 
debian: Add command to build Debian packages easily

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoAdd support for packaging Debian (deb) packages
Stefan Schantl [Mon, 25 Nov 2019 17:52:29 +0000 (18:52 +0100)] 
Add support for packaging Debian (deb) packages

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoBump version to 0.9.0 0.9.0
Michael Tremer [Mon, 25 Nov 2019 16:56:26 +0000 (16:56 +0000)] 
Bump version to 0.9.0

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoconfigure: Fix platform detection
Michael Tremer [Mon, 25 Nov 2019 16:55:08 +0000 (16:55 +0000)] 
configure: Fix platform detection

Checking for GNU platforms now instead of just Linux.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoperl: Provide library location when running the testsuite
Stefan Schantl [Thu, 21 Nov 2019 14:51:51 +0000 (15:51 +0100)] 
perl: Provide library location when running the testsuite

Otherwise the perl testsuite could not locate libloc and will fail.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolibresolv: Check different functions on different platforms
Michael Tremer [Sun, 24 Nov 2019 21:05:23 +0000 (21:05 +0000)] 
libresolv: Check different functions on different platforms

I could not find a function that is both present on Linux and
Mac OS X, so we now have to test differently.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoMake library build on Mac OS X
Michael Tremer [Sun, 24 Nov 2019 20:58:03 +0000 (20:58 +0000)] 
Make library build on Mac OS X

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoFix building man pages on Mac OS X
Michael Tremer [Sat, 19 Oct 2019 11:10:26 +0000 (12:10 +0100)] 
Fix building man pages on Mac OS X

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agodownloader: Check DNS for most recent version
Michael Tremer [Sun, 24 Nov 2019 19:20:00 +0000 (19:20 +0000)] 
downloader: Check DNS for most recent version

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agopo: Update German translation
Michael Tremer [Fri, 22 Nov 2019 14:08:22 +0000 (14:08 +0000)] 
po: Update German translation

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoMakefile: Do not indent variable assignments
Michael Tremer [Fri, 22 Nov 2019 14:07:49 +0000 (14:07 +0000)] 
Makefile: Do not indent variable assignments

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoperl: Remove RPATH
Michael Tremer [Thu, 21 Nov 2019 12:48:18 +0000 (12:48 +0000)] 
perl: Remove RPATH

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-downloader: Add man page
Michael Tremer [Sun, 17 Nov 2019 14:55:31 +0000 (14:55 +0000)] 
location-downloader: Add man page

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoAdd systemd unit files for location-downloader
Michael Tremer [Sun, 17 Nov 2019 14:52:24 +0000 (14:52 +0000)] 
Add systemd unit files for location-downloader

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-downloader: Add proper logging infrastructure
Michael Tremer [Sun, 17 Nov 2019 13:57:40 +0000 (13:57 +0000)] 
location-downloader: Add proper logging infrastructure

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoAdd download script to automatically update the database
Michael Tremer [Sun, 17 Nov 2019 13:45:39 +0000 (13:45 +0000)] 
Add download script to automatically update the database

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-query: Add listing networks by flags
Michael Tremer [Fri, 15 Nov 2019 15:58:59 +0000 (15:58 +0000)] 
location-query: Add listing networks by flags

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoFix names of flags
Michael Tremer [Fri, 15 Nov 2019 15:26:22 +0000 (15:26 +0000)] 
Fix names of flags

They belong to the networks, so that should be reflected in the name.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-query: Add output for ipset
Michael Tremer [Fri, 15 Nov 2019 14:22:35 +0000 (14:22 +0000)] 
location-query: Add output for ipset

Fixes: #12202
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-query: Allow exporting data for nftables
Michael Tremer [Fri, 15 Nov 2019 14:18:59 +0000 (14:18 +0000)] 
location-query: Allow exporting data for nftables

Fixes: #12201
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolocation-query: Support listing networks for xt_geoip
Michael Tremer [Fri, 15 Nov 2019 13:53:02 +0000 (13:53 +0000)] 
location-query: Support listing networks for xt_geoip

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agonetwork: Initialize country code with nothing
Michael Tremer [Fri, 15 Nov 2019 11:22:56 +0000 (11:22 +0000)] 
network: Initialize country code with nothing

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoImprove error reporting when a network could not be read from the database
Michael Tremer [Fri, 15 Nov 2019 11:20:08 +0000 (11:20 +0000)] 
Improve error reporting when a network could not be read from the database

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agopython: Raise error when a network/AS could not be read
Michael Tremer [Fri, 15 Nov 2019 11:14:39 +0000 (11:14 +0000)] 
python: Raise error when a network/AS could not be read

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agotest-stringpool: Include stdint.h on Linux
Michael Tremer [Tue, 22 Oct 2019 08:42:41 +0000 (08:42 +0000)] 
test-stringpool: Include stdint.h on Linux

This is required to have intmax_t declared.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoFix off_t casting in tests
Michael Tremer [Sat, 19 Oct 2019 10:54:52 +0000 (11:54 +0100)] 
Fix off_t casting in tests

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agodatabase: Fix checking pointer
Michael Tremer [Sat, 19 Oct 2019 10:53:34 +0000 (11:53 +0100)] 
database: Fix checking pointer

This always evaluated to true which is not what was intended here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoCorrect cast off_t to intmax_t before printing it
Michael Tremer [Sat, 19 Oct 2019 10:51:59 +0000 (11:51 +0100)] 
Correct cast off_t to intmax_t before printing it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agoMerge branch 'apple'
Michael Tremer [Fri, 18 Oct 2019 18:43:59 +0000 (19:43 +0100)] 
Merge branch 'apple'

4 years agoperl: Do not insist on Perl 5.28 or higher
Michael Tremer [Fri, 18 Oct 2019 18:43:27 +0000 (19:43 +0100)] 
perl: Do not insist on Perl 5.28 or higher

We have no special requirements here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 years agolinker: Do not use --gc-sections on non-GNU platforms
Michael Tremer [Fri, 18 Oct 2019 18:36:21 +0000 (19:36 +0100)] 
linker: Do not use --gc-sections on non-GNU platforms

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>