Re: 7.4.3 & 8.0.0beta1 + Solaris 9: default pg_hba.conf - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: 7.4.3 & 8.0.0beta1 + Solaris 9: default pg_hba.conf
Date
Msg-id 412387E0.70105@dunslane.net
Whole thread Raw
In response to Re: 7.4.3 & 8.0.0beta1 + Solaris 9: default pg_hba.conf breaks  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 7.4.3 & 8.0.0beta1 + Solaris 9: default pg_hba.conf breaks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:

>Andrew Dunstan <andrew@dunslane.net> writes:
>  
>
>>I thought the report was that *only* 255.255.255.255 failed. The 
>>question is why?
>>    
>>
>
>The impression I got was that some internal subroutine of getaddrinfo
>had a broken error-handling convention (ie, "return a numeric address
>value or -1 on error").
>  
>

Aha! Pardon me while I giggle.

>  
>
>>And would changing the hints passed to getaddrinfo_all 
>>improve matters (e.g. by filling in the ai_family with the value from 
>>the addr structure we already have)?
>>    
>>
>
>Seems unlikely.  I suppose you could argue that we shouldn't be using
>getaddrinfo on the netmask field at all; there's certainly not any value
>in doing a DNS lookup on it, for instance.  Maybe we should go back to
>using plain ol' inet_aton for it?  (Nah, won't handle IPv6...)
>
>
>  
>

We could do it if we tested the addr.ai_family first, and only did it in 
the IPv4 case. I agree calling getaddrinfo is overkill for masks.

cheers

andrew


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [ADMIN] SRPM for 8.0.0 beta?
Next
From: Manfred Spraul
Date:
Subject: Re: NOT LOGGED options (was Point in Time Recovery )