mailing list of musl libc
 help / color / mirror / code / Atom feed
* getaddrinfo(3) / AI_ADDRCONFIG
@ 2018-07-09 15:16 Christopher Friedt
  2018-07-09 22:38 ` Rich Felker
  0 siblings, 1 reply; 28+ messages in thread
From: Christopher Friedt @ 2018-07-09 15:16 UTC (permalink / raw)
  To: musl

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


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2018-07-19  0:57 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-09 15:16 getaddrinfo(3) / AI_ADDRCONFIG Christopher Friedt
2018-07-09 22:38 ` Rich Felker
2018-07-10  0:11   ` Christopher Friedt
2018-07-10  0:59     ` Rich Felker
2018-07-10 12:05       ` Christopher Friedt
2018-07-10 15:08         ` Rich Felker
2018-07-10 23:21           ` Christopher Friedt
2018-07-10 23:30             ` Christopher Friedt
2018-07-10 23:42               ` Christopher Friedt
2018-07-11  0:38               ` Rich Felker
2018-07-11  1:01                 ` Christopher Friedt
2018-07-11  1:26                   ` Rich Felker
2018-07-11 10:12                     ` Christopher Friedt
2018-07-11 16:44                       ` Rich Felker
2018-07-11 16:50                         ` Christopher Friedt
2018-07-11 17:00                           ` Rich Felker
2018-07-12  1:20                             ` Christopher Friedt
2018-07-13  1:49                               ` Rich Felker
2018-07-13  2:53                                 ` Christopher Friedt
2018-07-14  2:31                                   ` Rich Felker
2018-07-14 23:53                                     ` Christopher Friedt
2018-07-15  0:07                                       ` Rich Felker
2018-07-15  0:19                                         ` Rich Felker
2018-07-15  0:52                                           ` Rich Felker
2018-07-15  1:17                                             ` Christopher Friedt
2018-07-19  0:14                                               ` Christopher Friedt
2018-07-19  0:49                                                 ` Rich Felker
2018-07-19  0:57                                                   ` Christopher Friedt

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).