diff --git a/bin/tests/system/geoip2/data/GeoIP2-Domain.json b/bin/tests/system/geoip2/data/GeoIP2-Domain.json index fb8e914fe5..6786de7fa6 100644 --- a/bin/tests/system/geoip2/data/GeoIP2-Domain.json +++ b/bin/tests/system/geoip2/data/GeoIP2-Domain.json @@ -34,6 +34,11 @@ "domain" : "seven.org" } }, + { + "::10.53.0.8/128" : { + "domain" : "seven" + } + }, { "fd92:7065:b8e:ffff::1/128" : { "domain" : "one.de" @@ -68,5 +73,10 @@ "fd92:7065:b8e:ffff::7/128" : { "domain" : "seven.org" } + }, + { + "fd92:7065:b8e:ffff::8/128" : { + "domain" : "seven" + } } ] diff --git a/bin/tests/system/geoip2/data/GeoIP2-Domain.mmdb b/bin/tests/system/geoip2/data/GeoIP2-Domain.mmdb index fe93decbbe..a0ee647f16 100644 Binary files a/bin/tests/system/geoip2/data/GeoIP2-Domain.mmdb and b/bin/tests/system/geoip2/data/GeoIP2-Domain.mmdb differ diff --git a/bin/tests/system/geoip2/ns2/named11.conf.j2 b/bin/tests/system/geoip2/ns2/named11.conf.j2 index b6d2a44624..e684c9a6ad 100644 --- a/bin/tests/system/geoip2/ns2/named11.conf.j2 +++ b/bin/tests/system/geoip2/ns2/named11.conf.j2 @@ -91,6 +91,14 @@ view seven { }; }; +view eight { + match-clients { geoip domain seven; }; # non-matching name (a substring of the previous entry), see GL#6019 + zone "example" { + type primary; + file "example8.db"; + }; +}; + view none { match-clients { any; }; zone "example" { diff --git a/bin/tests/system/geoip2/setup.sh b/bin/tests/system/geoip2/setup.sh index f3acf988c5..20b64462da 100644 --- a/bin/tests/system/geoip2/setup.sh +++ b/bin/tests/system/geoip2/setup.sh @@ -13,7 +13,7 @@ . ../conf.sh -for i in 1 2 3 4 5 6 7 other bogus; do +for i in 1 2 3 4 5 6 7 8 other bogus; do cp ns2/example.db.in ns2/example${i}.db echo "@ IN TXT \"$i\"" >>ns2/example$i.db done diff --git a/bin/tests/system/geoip2/tests.sh b/bin/tests/system/geoip2/tests.sh index a8e8845a41..b448694cf8 100644 --- a/bin/tests/system/geoip2/tests.sh +++ b/bin/tests/system/geoip2/tests.sh @@ -431,7 +431,7 @@ n=$((n + 1)) echo_i "checking Domain database using IPv4 ($n)" ret=0 lret=0 -for i in 1 2 3 4 5 6 7; do +for i in 1 2 3 4 5 6 7 8; do $DIG $DIGOPTS txt example -b 10.53.0.$i >dig.out.ns2.test$n.$i || lret=1 j=$(cat dig.out.ns2.test$n.$i | tr -d '"') [ "$i" = "$j" ] || lret=1 @@ -446,7 +446,7 @@ if testsock6 fd92:7065:b8e:ffff::3; then echo_i "checking Domain database using IPv6 ($n)" ret=0 lret=0 - for i in 1 2 3 4 5 6 7; do + for i in 1 2 3 4 5 6 7 8; do $DIG $DIGOPTS6 txt example -b fd92:7065:b8e:ffff::$i >dig.out.ns2.test$n.$i || lret=1 j=$(cat dig.out.ns2.test$n.$i | tr -d '"') [ "$i" = "$j" ] || lret=1