7.4 defaulting to ipv6 ?

Started by Kaare Rasmussenover 22 years ago3 messagesgeneral
Jump to latest
#1Kaare Rasmussen
kar@kakidata.dk

Sorry if this is obvious to you, but it's not obvious to me.

In 7.4 this

psql -h 127.0.0.1 test and
psql -h localhost test

will be authenticated as ipv6 addresses. As long as you know, it's OK, but is
this intentional?

--
Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582
Kaki Data tshirts, merchandize Fax: 3816 2501
Howitzvej 75 �ben 12.00-18.00 Email: kar@kakidata.dk
2000 Frederiksberg L�rdag 12.00-16.00 Web: www.suse.dk

#2Bruce Momjian
bruce@momjian.us
In reply to: Kaare Rasmussen (#1)
Re: 7.4 defaulting to ipv6 ?

Kaare Rasmussen wrote:

Sorry if this is obvious to you, but it's not obvious to me.

In 7.4 this

psql -h 127.0.0.1 test and
psql -h localhost test

will be authenticated as ipv6 addresses. As long as you know, it's OK, but is
this intentional?

This will be clearer in 7.4beta3. We will accept 127.0.0.1 properly.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kaare Rasmussen (#1)
Re: 7.4 defaulting to ipv6 ?

Kaare Rasmussen <kar@kakidata.dk> writes:

Sorry if this is obvious to you, but it's not obvious to me.
In 7.4 this
psql -h 127.0.0.1 test and
psql -h localhost test
will be authenticated as ipv6 addresses.

Only if your libc and/or kernel preferentially treats them as ipv6.

CVS tip contains a fix to allow ipv4 addresses in pg_hba.conf to match
ipv4-mapped-to-v6 ipv6 connections; this should allow people to continue
believing they are using ipv4 even when their system is mapping to v6.

regards, tom lane