[dns-operations] The Python 3 socket.getaddrinfo() Case Sensitivity Problem

Viktor Dukhovni ietf-dane at dukhovni.org
Thu Jul 4 22:30:36 UTC 2019


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?

    https://raw.githubusercontent.com/vdukhovni/postfix/master/postfix/auxiliary/name-addr-test/getaddrinfo.c

-- 
	Viktor.



More information about the dns-operations mailing list