Re: Proposal: allow non-masked IPs inside of pg_hba.conf - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: allow non-masked IPs inside of pg_hba.conf
Date
Msg-id 3211610.1739305812@sss.pgh.pa.us
Whole thread Raw
In response to Proposal: allow non-masked IPs inside of pg_hba.conf  (Greg Sabino Mullane <htamfids@gmail.com>)
Responses Re: Proposal: allow non-masked IPs inside of pg_hba.conf
List pgsql-hackers
Greg Sabino Mullane <htamfids@gmail.com> writes:
> Currently, all IP addresses in the address field of records in the
> pg_hba.conf file require a CIDR mask.
> ...
> I'd like to relax that requirement, such that a lack of an explicit mask
> defaults to a /32 mask, allowing that first example to work as most people
> would expect.

This too would work better if hba.c were sharing cidr_in's logic:

regression=# select '1.2.3.4'::cidr;
    cidr    
------------
 1.2.3.4/32
(1 row)

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PATCH: Disallow a netmask of zero unless the IP is also all zeroes
Next
From: Tom Lane
Date:
Subject: Re: explain analyze rows=%.0f