Re: pg_hba.conf confusion

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_hba.conf confusion
Дата
Msg-id 200206212011.g5LKBUP14924@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: pg_hba.conf confusion  ("David M. Kaplan" <dmkaplan@ucdavis.edu>)
Список pgsql-bugs
David M. Kaplan wrote:
> 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?

A netmask of  255.255.255.128 means ignore the bottom seven bits of the
address.  You are right they may as well be zero so in the case above
192.168.1.2 and 192.168.1.0 would behave the same.  Is there something
else you wanted it to do?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: regex (not) matching null string
Следующее
От: Tom Lane
Дата:
Сообщение: Re: I have problem with pg_dump in PostgreSQL 7.1.2