From 3c9bb8886df7d56aaeb619abc246462fa809d946 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 5 Sep 2003 20:31:36 +0000 Subject: Allow IPv4-format entries in pg_hba.conf to match IPv6 connections that have IPv4-embedded-in-IPv6 addresses. Per idea of Andreas Pflug. --- doc/src/sgml/client-auth.sgml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml index 2ad7a6a29fc..481957e4ee1 100644 --- a/doc/src/sgml/client-auth.sgml +++ b/doc/src/sgml/client-auth.sgml @@ -1,5 +1,5 @@ @@ -199,13 +199,17 @@ hostnossl database user (actual-IP-address xor IP-address-field) and IP-mask-field - must be zero for the record to match. (Of course IP addresses - can be spoofed but this consideration is beyond the scope of - PostgreSQL.) If you machine supports - IPv6, the default pg_hba.conf file will have an - IPv6 entry for localhost. You can add your own IPv6 - entries to the file. IPv6 entries are used only for IPv6 - connections. + must be zero for the record to match. + + + + An IP address given in IPv4 format will match IPv6 connections that + have the corresponding address, for example 127.0.0.1 + will match the IPv6 address ::ffff:127.0.0.1. An entry + given in IPv6 format will match only IPv6 connections, even if the + represented address is in the IPv4-in-IPv6 range. Note that entries + in IPv6 format will be rejected if the system's C library does not have + support for IPv6 addresses. @@ -219,9 +223,10 @@ hostnossl database user CIDR-mask - This is an integer specifying the number of significant bits - to set in the mask, and is an alternative to using the - IP-mask notation. The number must + This field may be used as an alternative to the + IP-mask notation. It is an + integer specifying the number of high-order bits + to set in the mask. The number must be between 0 and 32 (in the case of an IPv4 address) or 128 (in the case of an IPv6 address) inclusive. 0 will match any address, while 32/128 will match only the exact host specified. -- cgit v1.2.3