Re: pg_hba.conf confusion

David M. Kaplan <dmkaplan@ucdavis.edu>

From: "David M. Kaplan" <dmkaplan@ucdavis.edu>
To: Reinhard Max <max@suse.de>, pgsql-bugs@postgresql.org
Date: 2002-06-18T16:28:19Z
Lists: pgsql-bugs
Thanks, that did fix that problem.  Now I have another one.  The line:

host    all    192.168.1.2    255.255.255.128    password

matches all ip addresses of the form 192.168.1.x.  If I change the mask 
to 255.255.255.255 it no longer matches all addresses.  Although this 
fixes the problem, it seems strange to me that it works this way. 
 Basically, if mask is something other than 255.255.255.255, you might 
as well put 0's in your id address.  This doesnt seem to be how subnet 
masks normally work and it seems redundant to me.  

Is there something I don't understand?

Thanks,
David


Reinhard Max wrote:

>Hi,
>
>On Mon, 17 Jun 2002 at 20:47, David M. Kaplan wrote:
>
>>host       all         127.0.0.1     0.0.0.0    ident    sameuser
>>
>
>If you want this entry to match only the loopback device, the mask has
>to be 255.255.255.255 instead of 0.0.0.0. A mask of 0.0.0.0 causes
>*all* IP addresses to match this line.
>
>cu
>	Reinhard
>
>