Hi mighty brains!
I would like to report possible bug in libSystem.
While porting nss_wrapper (part of
cwrap.org) project one with my test fails when I tried to work with ipv6 in form: ::12.
After close debugging it looks like libSystem contain bug which is reproducible by attached reproducer.
Core problem:
Looks like one of inet_*() functions are not able to translate ipv6 addresses in form ::XX where XX are numbers.
Intresting fact is: ::1 works as expected.
Steps to Reproduce:
1) compile attached file libSystem-bug.c
2) run
Expected Results:
Output of attached reproduceer. Same results on (FreeBSD, OmniOS, Linux):
PASS: match with '::1' found!
result (pointer): ::12
result (buffer): ::12
PASS: match with '::12' found!
Actual Results:
PASS: match with '::1' found!
result (pointer): ::0.0.0.18
result (buffer): ::0.0.0.18
FAIL: no match with '::12' found!
Version:
10.9 and 10.11 (with latest updates).
Notes:
* I tested this behavior across different operating systems (FreeBSD, OmniOS - aka Solaris, Linux Fedora 20).
* I already opened bug 23739955 however I feel that this bug report would be better here.