Re: CIDR in pg_hba.conf
От | Tom Lane |
---|---|
Тема | Re: CIDR in pg_hba.conf |
Дата | |
Msg-id | 27808.1052324959@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: CIDR in pg_hba.conf (Larry Rosenman <ler@lerctr.org>) |
Ответы |
Re: CIDR in pg_hba.conf
|
Список | pgsql-hackers |
Larry Rosenman <ler@lerctr.org> writes: > --On Wednesday, May 07, 2003 09:50:55 -0400 Andrew Dunstan >> So in hba.c, if we found a / in the IP address, we wouldn't go looking >> for a separate netmask field. > Please do this ! It works for me. One thought though: someday someone might want to get around to allowing a DNS name in the host field, too. Can we define a test that handles all three cases? Perhaps do this: * If IP address contains only 0-9 and dot (easily coded with strspn()), then it's old-style IP address; expect netmask as next field. * If IP address contains only 0-9, dot, and slash, then it's CIDR; there's no separate netmask field. * Otherwise IP address is a DNS name; there's no separate netmask. (This case can error out for now, unless you're feeling ambitious.) regards, tom lane
В списке pgsql-hackers по дате отправления: