Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF4BF-S7VOBq9YnaN3gu7N==aujkfytgPN6qiXXKyHjO=gn-xw@mail.gmail.com>
Date: Mon, 9 Jul 2018 11:16:04 -0400
From: Christopher Friedt <chrisfriedt@...il.com>
To: musl@...ts.openwall.com
Subject: getaddrinfo(3) / AI_ADDRCONFIG

Hi list,

I have a patch for getaddrinfo(3) so that AI_ADDRCONFIG is properly
supported. Currently, if user code passes in the aforementioned flag,
there is no check to see whether a non-loopback network interface is
configured with the specified (or unspecified) address family before
returning results, which is what getaddrinfo(3) should do according to
[1].

As a result of the current behaviour, musl's getaddrinfo(3) would
return e.g. "::1" to user code even when no interfaces (including lo)
were configured with IPv6 addresses. I've documented this to some
extent here [2].

Please see the patch at [3] for my fix. Any feedback is welcome. The
patch It applies against master and 1.1.19, but possibly other
releases.

C

[1] http://man7.org/linux/man-pages/man3/getaddrinfo.3.html
[2] https://issues.apache.org/jira/browse/THRIFT-4594
[3] https://patch-diff.githubusercontent.com/raw/cfriedt/musl/pull/1
https://patch-diff.githubusercontent.com/raw/cfriedt/musl/pull/1.diff

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.