Re: pg_hba.conf confusion - Mailing list pgsql-bugs

From David M. Kaplan
Subject Re: pg_hba.conf confusion
Date
Msg-id 3D0F5FA3.10903@ucdavis.edu
Whole thread Raw
In response to Re: pg_hba.conf confusion  (Reinhard Max <max@suse.de>)
Responses Re: pg_hba.conf confusion  (Bruce Momjian <pgman@candle.pha.pa.us>)
List 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
>
>

pgsql-bugs by date:

Previous
From: Ingo Ciechowski
Date:
Subject: WHERE =NULL malfunction in release 7.2
Next
From: Bruno Wolff III
Date:
Subject: Re: WHERE =NULL malfunction in release 7.2