Bug 11477 - getaddrinfo ignores AI_NUMERICHOST and unilaterally calls libc_getaddrinfo
Summary: getaddrinfo ignores AI_NUMERICHOST and unilaterally calls libc_getaddrinfo
Alias: None
Product: cwrap
Classification: Unclassified
Component: library (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact:
Depends on:
Reported: 2015-08-31 01:48 UTC by Andrew Bartlett
Modified: 2015-11-20 11:56 UTC (History)
0 users

See Also:

Proposed patch (3.43 KB, patch)
2015-09-07 07:01 UTC, Robin Hack
no flags Details
Proposed patch v2 (3.34 KB, patch)
2015-09-07 08:51 UTC, Robin Hack
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Bartlett 2015-08-31 01:48:09 UTC
The getaddrinfo wrapper ignores AI_NUMERICHOST, and while it does use the libc getaddrinfo() to avoid doing the parsing manually, it should only be done if hints.flags includes AI_NUMERICHOST.
Comment 1 Robin Hack 2015-09-04 11:32:45 UTC
Hi Andrew.

Could you provide your test case or part of code please?
Comment 2 Robin Hack 2015-09-07 07:01:57 UTC
Created attachment 11414 [details]
Proposed patch

Please ignore previous comment. Sorry for noise.

Proposed patch. Could somebody review it please?
Comment 3 Robin Hack 2015-09-07 08:51:13 UTC
Created attachment 11415 [details]
Proposed patch v2

Proposed patch v2.

Just minor cleanup in test case.
Comment 4 Andreas Schneider 2015-10-07 15:03:44 UTC
Robin, is this patch still valid for the current master tree? If yes, please rebase it.
Comment 5 Robin Hack 2015-10-13 12:25:38 UTC
Hi Andreas.

New proposed patch rebased against master is here:
Comment 6 Andreas Schneider 2015-11-20 11:56:07 UTC
nss_wrapper-1.1.0 has been released addressing the issue.