Re: 7.4devel auth failed - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: 7.4devel auth failed
Date
Msg-id 200303241908.h2OJ8Y401740@candle.pha.pa.us
Whole thread Raw
In response to 7.4devel auth failed  (Andreas Pflug <Andreas.Pflug@web.de>)
List pgsql-hackers
That's strange.  I just tested it here, and it worked.  I have IPv6 code
enabled. but no IPv6 in my kernel, so there are just IPv4 connections.

Can you peek in this funciton and see where it is failing:intrangeSockAddrAF_INET(const SockAddr *addr, const SockAddr
*netaddr,                    const SockAddr *netmask){    if (addr->sa.sa_family != AF_INET ||
netaddr->sa.sa_family!= AF_INET ||        netmask->sa.sa_family != AF_INET)        return 0;    if
(((addr->in.sin_addr.s_addr^ netaddr->in.sin_addr.s_addr) &         netmask->in.sin_addr.s_addr) == 0)        return 1;
  else        return 0;}       
 

That is the IPv4 function.       
---------------------------------------------------------------------------

Andreas Pflug wrote:
> Trying to connect from pgadmin2, I get the message
> "no pg_hba.conf entry for ..."
> 
> I found that the ip address matching with rangeSockAdr in line 651 in 
> hba.c fails.
> 
> I get access if I set ipaddr/mask to 0.0.0.0/0.0.0.0 in pg_hba.conf.
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 

--  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,
Pennsylvania19073
 



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: A bad behavior under autocommit off mode
Next
From: Bruce Momjian
Date:
Subject: Re: A bad behavior under autocommit off mode