Thread: alternative solution for ipv6 loopback

alternative solution for ipv6 loopback

From
Andrew Dunstan
Date:
I just thought of something:

For a *real* special case, with no new keywords or other stuff, we could 
just add something like this to hba.c at the start of the 'host*' 
section of parse_hba():

#ifndef HAVE_IPV6       if (strcmp(token,"::1") == 0 || strcmp(token,"::1/128") == 0)           return;
#endif

A bit fragile, but it would allow a default line for the ip6 loopback 
address that wouldn't break ip4 only postmasters.

Any other type of ip6 address would break, as I believe it should. And 
we wouldn't have to write special routines to handle ip6 addresses where 
we otherwise don't know about them.

cheers

andrew