The problem in the geo module (subdivisions lookup)
Seems like a knot dns versions 2.7.6-2 and 2.9.3-1 has a problem with lookup in subdivisions.
The
geodb-key: [ subdivisions/0/names/en ]
itself works correctly.
The the next key-set
geodb-key: [ country/iso_code, city/names/en, subdivisions/0/names/en ]
doesn't work as expected.
Version 2.7.6-2
Lookup doesn't work if to use the next format of geo config (always matches "RU;*;*"
)
- geo: "RU;*;Novosibirsk Oblast"
CNAME: ru-nsk.test.
- geo: "RU;*;Kemerovo Oblast"
CNAME: ru-kmr.test.
- geo: "RU;*;*"
CNAME: ru.test.`
Lookup works if to use the "wide mask" at the top of list (matches country and the region)
- geo: "RU;*;*"
CNAME: ru.test.
- geo: "RU;*;Novosibirsk Oblast"
CNAME: ru-nsk.test.
- geo: "RU;*;Kemerovo Oblast"
CNAME: ru-kmr.test.
Version 2.9.3-1 always matches "RU;*;*"
and doesn't match the region.
In my lab, I was making DNS queries from the IP addresses listed below. Test data set (mmdblookup output)
Country: ru-kmr | IPv4: 95.181.0.1
"RU" <utf8_string>
"Kemerovo" <utf8_string>
"Kemerovo Oblast" <utf8_string>
Country: ru-nsk | IPv4: 212.164.51.130
"RU" <utf8_string>
"Tatarsk" <utf8_string>
"Novosibirsk Oblast" <utf8_string>
Database metadata
Node count: 3907178
Record size: 28 bits
IP version: IPv6
Binary format: 2.0
Build epoch: 1586906821 (2020-04-14 23:27:01 UTC)
Type: GeoLite2-City
Languages: de en es fr ja pt-BR ru zh-CN
Description:
en: GeoLite2 City database