Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion t/maxmind-db
Submodule maxmind-db updated 70 files
+1 −1 .github/workflows/go.yml
+1 −1 .github/workflows/links.yml
+1 −1 .github/workflows/pages.yml
+1 −1 .github/workflows/precious.yml
+100 −90 .golangci.yml
+ − bad-data/libmaxminddb/libmaxminddb-deep-array-nesting.mmdb
+ − bad-data/libmaxminddb/libmaxminddb-deep-nesting.mmdb
+4 −4 go.mod
+6 −6 go.sum
+37 −37 mise.lock
+4 −5 pkg/writer/baddata.go
+9 −26 pkg/writer/decoder.go
+90 −0 pkg/writer/fixtures_test.go
+28 −7 pkg/writer/geoip2.go
+49 −0 pkg/writer/geoip2_test.go
+5 −5 pkg/writer/maxmind.go
+3 −4 pkg/writer/nestedstructures.go
+0 −1 pkg/writer/pointerdos_test.go
+2 −1 pkg/writer/rawmmdb_test.go
+1 −1 pkg/writer/writer.go
+9 −9 source-data/GeoIP-Anonymous-Plus-Test.json
+1 −1 source-data/GeoIP-Regions-Test.json
+10 −10 source-data/GeoIP2-Anonymous-IP-Test.json
+17 −94 source-data/GeoIP2-City-Test.json
+24 −24 source-data/GeoIP2-Connection-Type-Test.json
+17 −17 source-data/GeoIP2-Country-Test.json
+2 −2 source-data/GeoIP2-DensityIncome-Test.json
+89 −89 source-data/GeoIP2-Domain-Test.json
+20 −20 source-data/GeoIP2-Enterprise-Test.json
+4 −4 source-data/GeoIP2-IP-Risk-Test.json
+1,879 −1,879 source-data/GeoIP2-ISP-Test.json
+38 −38 source-data/GeoIP2-Precision-Enterprise-Test.json
+150 −150 source-data/GeoIP2-Static-IP-Score-Test.json
+150 −150 source-data/GeoIP2-User-Count-Test.json
+ − test-data/GeoIP-Anonymous-Plus-Test.mmdb
+ − test-data/GeoIP-Regions-Test.mmdb
+ − test-data/GeoIP-Residential-Proxy-Test.mmdb
+ − test-data/GeoIP2-Anonymous-IP-Test.mmdb
+ − test-data/GeoIP2-City-Shield-Test.mmdb
+ − test-data/GeoIP2-City-Test.mmdb
+ − test-data/GeoIP2-Connection-Type-Test.mmdb
+ − test-data/GeoIP2-Country-Shield-Test.mmdb
+ − test-data/GeoIP2-Country-Test.mmdb
+ − test-data/GeoIP2-DensityIncome-Test.mmdb
+ − test-data/GeoIP2-Domain-Test.mmdb
+ − test-data/GeoIP2-Enterprise-Shield-Test.mmdb
+ − test-data/GeoIP2-Enterprise-Test.mmdb
+ − test-data/GeoIP2-IP-Risk-Test.mmdb
+ − test-data/GeoIP2-ISP-Test.mmdb
+ − test-data/GeoIP2-Precision-Enterprise-Shield-Test.mmdb
+ − test-data/GeoIP2-Precision-Enterprise-Test.mmdb
+ − test-data/GeoIP2-Static-IP-Score-Test.mmdb
+ − test-data/GeoIP2-User-Count-Test.mmdb
+ − test-data/GeoLite2-ASN-Test.mmdb
+ − test-data/GeoLite2-City-Test.mmdb
+ − test-data/GeoLite2-Country-Test.mmdb
+ − test-data/MaxMind-DB-no-ipv4-search-tree.mmdb
+ − test-data/MaxMind-DB-string-value-entries.mmdb
+ − test-data/MaxMind-DB-test-decoder.mmdb
+ − test-data/MaxMind-DB-test-ipv4-24.mmdb
+ − test-data/MaxMind-DB-test-ipv4-28.mmdb
+ − test-data/MaxMind-DB-test-ipv4-32.mmdb
+ − test-data/MaxMind-DB-test-ipv6-24.mmdb
+ − test-data/MaxMind-DB-test-ipv6-28.mmdb
+ − test-data/MaxMind-DB-test-ipv6-32.mmdb
+ − test-data/MaxMind-DB-test-metadata-pointers.mmdb
+ − test-data/MaxMind-DB-test-mixed-24.mmdb
+ − test-data/MaxMind-DB-test-mixed-28.mmdb
+ − test-data/MaxMind-DB-test-mixed-32.mmdb
+ − test-data/MaxMind-DB-test-nested.mmdb
6 changes: 3 additions & 3 deletions t/metadata_t.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
void test_metadata(MMDB_s *mmdb, const char *mode_desc) {
cmp_ok(mmdb->metadata.node_count,
"==",
163,
"node_count is 163 - %s",
139,
"node_count is 139 - %s",
mode_desc);
cmp_ok(mmdb->metadata.record_size,
"==",
Expand Down Expand Up @@ -197,7 +197,7 @@ void test_metadata_as_data_entry_list(MMDB_s *mmdb, const char *mode_desc) {
if (strcmp(key_name, "node_count") == 0) {
MMDB_entry_data_list_s *value = entry_data_list =
entry_data_list->next;
cmp_ok(value->entry_data.uint32, "==", 163, "node_count == 163");
cmp_ok(value->entry_data.uint32, "==", 139, "node_count == 139");
} else if (strcmp(key_name, "record_size") == 0) {
MMDB_entry_data_list_s *value = entry_data_list =
entry_data_list->next;
Expand Down
54 changes: 27 additions & 27 deletions t/read_node_t.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,47 +78,47 @@ void run_24_bit_record_tests(int mode, const char *mode_desc) {
0,
1,
MMDB_RECORD_TYPE_SEARCH_NODE,
435,
401,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
80,
81,
MMDB_RECORD_TYPE_SEARCH_NODE,
323,
299,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
96,
97,
MMDB_RECORD_TYPE_SEARCH_NODE,
148,
147,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
103,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
104,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
127,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
514,
424,
MMDB_RECORD_TYPE_DATA,
},
{
132,
527,
491,
MMDB_RECORD_TYPE_DATA,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
},
{
241,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
242,
MMDB_RECORD_TYPE_SEARCH_NODE,
Expand All @@ -139,47 +139,47 @@ void run_28_bit_record_tests(int mode, const char *mode_desc) {
0,
1,
MMDB_RECORD_TYPE_SEARCH_NODE,
435,
401,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
80,
81,
MMDB_RECORD_TYPE_SEARCH_NODE,
323,
299,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
96,
97,
MMDB_RECORD_TYPE_SEARCH_NODE,
148,
147,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
103,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
104,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
127,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
514,
424,
MMDB_RECORD_TYPE_DATA,
},
{
132,
527,
491,
MMDB_RECORD_TYPE_DATA,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
},
{
241,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
242,
MMDB_RECORD_TYPE_SEARCH_NODE,
Expand All @@ -200,47 +200,47 @@ void run_32_bit_record_tests(int mode, const char *mode_desc) {
0,
1,
MMDB_RECORD_TYPE_SEARCH_NODE,
435,
401,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
80,
81,
MMDB_RECORD_TYPE_SEARCH_NODE,
323,
299,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
96,
97,
MMDB_RECORD_TYPE_SEARCH_NODE,
148,
147,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
103,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
104,
MMDB_RECORD_TYPE_SEARCH_NODE,
},
{
127,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
514,
424,
MMDB_RECORD_TYPE_DATA,
},
{
132,
527,
491,
MMDB_RECORD_TYPE_DATA,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
},
{
241,
444,
408,
MMDB_RECORD_TYPE_EMPTY,
242,
MMDB_RECORD_TYPE_SEARCH_NODE,
Expand Down
Loading