[dns-operations] The Python 3 socket.getaddrinfo() Case Sensitivity Problem
m3047
m3047 at m3047.net
Fri Jul 5 14:47:49 UTC 2019
TLDR: I applied some OS updates and now can't reproduce the problem. Sorry
to be saying this, not sorry to see the problem gone. If it comes back,
I'll spend some more time tracking it down.
That is a locally minted TLD, and for the record there is a searchlist
which ends with a wildcarded _valid_ domain, hence a valid IP4 address
rather than NXDOMAIN (but not the correct one); it's trying to resolve the
address of a machine hosting Redis internally and that's what the Redis
Python client's code looks like. The actual name in the zone file is
uppercased ("SOPHIA") and dig returns it as "SOPHIA.m3047".
Perl / C / Python: Using dnspython works. Hence the workaround I gave a
link to. I suspect a problem in the underlying libraries (not Python per
se) but haven't pursued it. (SuSE Leap 15.0 x86_64, BIND 9.12.3 compiled
locally.)
It is resolved correctly via a domain that the local caching resolver(s)
serve authoritatively. dig resolves it correctly, from that box, even as
Redis fails. It even worked correctly some of the time, from that box. But
not all the time.
I'd hate to see case sensitivity become the new newly invented old
problem. I don't know of another place which discusses global naming
schemes and operational problems therewith separate from running name
servers. I'd like to think that DNS is a sane choice for internal
directory services in the datacenter, and if that's not the case then
where does the cohort of people to run _The_ DNS come from?
--
Fred Morris
On Thu, 4 Jul 2019, Viktor Dukhovni wrote:
> On Thu, Jul 04, 2019 at 02:46:21PM -0700, Fred Morris wrote:
>
>> Today I bring to you the Python3 socket implementation, which appears to
>> be case sensitive when doing DNS resolutions:
>>
>> # python3
>> python> from socket import getaddrinfo
>> python> getaddrinfo('sophia.m3047',6379)
>
> That does not look like a DNS FQDN. How is that name resolved? Is
> it via /etc/hosts? Surely python3 just calls the C-library
> getaddrinfo() and return its results, in which case any case-sensitivity
> is not Python's fault. Have you tried Perl? Or a C program?
More information about the dns-operations
mailing list