Re: pg_hba.conf: samehost and samenet

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: stef <stef(at)memberwebs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_hba.conf: samehost and samenet
Date: 2009-08-26 16:03:05
Message-ID: 9837222c0908260903u6143628dx23836d332212c2a7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/8/25 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> Stef Walter wrote:
>> Magnus Hagander wrote:
>
>> > and not just use SIOCGIFCONF for all Unixen?
>>
>> I do know that using SIOCGIFCONF on AIX comes with strange wrinkles and
>> variable length data structures etc... getifaddrs() on AIX is a far more
>> maintainable interface.
>
> Clearly the getifaddrs code looks nicer.  How can we distinguish the
> SIOCGIFCONF implementations that have wrinkles from those that don't?
> Is there some autoconf macro?

If there are some that do have it, and these platforms support
getifaddrs(), that certainly seems like a worthwhile reason. I was
just looking for the case when the SIOGIFCONF code would be identical
on all platforms - in which case we'd jus tbe maintaining some
unnecessary code. So it seems fine here.

> Something to keep in mind -- my getifaddrs(3) manpage says that on BSD
> it can return addresses that have ifa_addr set to NULL, which your code
> doesn't seem to check.

Eek. This is not defined by any standard, is it? I wonder how many
different behaviours we can find there :(

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-08-26 16:07:40 Re: 8.5 release timetable, again
Previous Message Kevin Grittner 2009-08-26 15:46:44 Re: 8.5 release timetable, again