On Wed, 10 May 2023 15:11:41 +0200 Ingeborg Hellemo ingeborg.hellemo@uit.no wrote:
comes from the PTR record for the device's IP address. If you change the casing of the PTR record in DNS, you also effectively invalidate the ipdevinfo DNS cache for that host.
I suspect that there is som kind of case sensitive comparison somewhere besides the cache.
All the troublesome devices I have found have a sysname like "roomb1000.domain" while the DNS RRs are "roomB1000.domain", both A and PTR.
Interesting. So you're actually saying the sysname registered for this device in NAV has the wrong casing too? I do see that if the casing of the PTR record changes around, that will not actually reflect in NAV, as the ipdevpoll DNS plugin will do a case insensitive match between the retrieved DNS record and the existing sysname value of a device before it decides whether to update the database.
However, testing the innards of the async DNS resolver code in NAV (which is used by the web UI) I found this line, which actually seems to be your problem:
https://github.com/Uninett/nav/blob/4c9e477db003d25ab89391234a6cb80514cafc72...
The records that are returned in a DNS response are matched *case sensitively* against the hostname from the query. So when the casing of the DNS result doesn't match the query, the result record is just ignored.
Bug report time! :)