[mythtv] [mythtv-commits] Ticket #9756: DBHostName=localhost causes MythSocket to attempt to contact mysql on ::1 (ipv6 localhost)

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Tue May 3 15:18:07 UTC 2011


On Tue, May 03, 2011 at 09:12:35AM -0600, E. Westbrook wrote:
> For the benefit of the archive, I'll assume your meaning and say you're
> absolutely right -- localhost6 is very silly indeed.

Well on Debian I see ip6-localhost for ::1 on an older system, and both
localhost and ip6-localhost on a newer system.  Software better start
getting used to multiple results and dealing with both IPv4 and IPv6.

Seems to return sensible results too:
$ host localhost
localhost has address 127.0.0.1
localhost has IPv6 address ::1

> Anyone is free to use it, of course, but it shouldn't be advocated, and it
> isn't present in contemporary stock hosts files.  The right idea,
> ostensibly, is for the same hostname to get you to the right place,
> transparently to the user.

Perhaps it made sense when a lot of programs didn't like IPv6 addresses,
but yeah it doesn't make sense longterm.

> More to the point, the obligation isn't on the user to configure it right --
> it's on the applications to support it right.  Tricks like localhost6
> actually *prevent* good applications from doing the right thing.
> Thankfully, this is only an /etc/hosts issue, since an ipv6-ignorant
> application will never ask for (and therefore never receive) an AAAA record
> from DNS.

Agreed.

> So, better to tell the ipv6-ignorant application to use ipv4 numerically,
> say in mysql.txt, than to tell the whole system wrongly that localhost is
> only on ipv4 in /etc/hosts.
> 
> Anyway, we'll all get there, eventually -- even if it takes until about
> 2025, at the current rate. ;)
> 
> (Off-topic rant: People are going to keep squeezing every last drop out of
> ipv4 for years to come, with all sorts of chicanery and nonsense in the face
> of RIR and IANA exhaustion.  This is due to the unfortunate design
> consequences of ipv6 -- while anyone can turn on ipv6, and absolutely
> should, no one can *entirely* shut off ipv4 until *everyone* can.)

Why can't we just switch already. :)

-- 
Len Sorensen


More information about the mythtv-dev mailing list