Package: xtables-addons / 3.13-1

use-correct-download-URL-for-MaxMind-DB-s.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Last-Update: 2020-11-22
Forwarded: https://lore.kernel.org/netfilter-devel/20201122140530.250248-1-jeremy@azazel.net/
Author: Jeremy Sowden <jeremy@azazel.net>
Description: use correct download URL for
 MaxMind DB's.
 .
 The download URL for the GeoLite2 DB's has changed and includes a
 licence-key.  Update the download script to read the key from file or
 stdin and use the correct URL.

--- a/geoip/xt_geoip_dl_maxmind
+++ b/geoip/xt_geoip_dl_maxmind
@@ -1,7 +1,16 @@
 #!/bin/sh
 
+if [ $# -eq 1 ]; then
+    exec <$1
+elif [ $# -ne 0 ]; then
+    echo $(basename $0) [ licence_key_file ] 1>&2
+    exit 1
+fi
+
+read licence_key
+
 rm -rf GeoLite2-Country-CSV_*
 
-wget -q http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
+wget -q -OGeoLite2-Country-CSV.zip "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=${licence_key}&suffix=zip"
 unzip -q GeoLite2-Country-CSV.zip
 rm -f GeoLite2-Country-CSV.zip
-- 
2.29.2