[Bug 279618] getnameinfo - IPv6 problem

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 26 Jul 2024 11:05:04 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279618

--- Comment #2 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=c179937b986ec3959d89bfeb8eed0a6f58a28649

commit c179937b986ec3959d89bfeb8eed0a6f58a28649
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-06-10 11:34:25 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-07-26 11:03:56 +0000

    libc/getnameinfo: stop adding NI_NUMERICHOST where inappropriate

    Checking the first nibble of the IPv6 address to be 0 and then
    excluding two well known cases (v4-mapped, loopback) leaves us with
    more cases where the first nibble could be 0, e.g., the RFC 6052,
    2.1 Well-Known Prefix 64:ff9b::/96.
    It is not practical to track them all and it is not clear what lead
    to this special casing originally, so remove them.

    While here also remove the IN6_IS_ADDR_LINKLOCAL() + NI_NUMERICHOST
    case as link-local address resolution does exist.

    We do leave the IN6_IS_ADDR_MULTICAST() case for now as I could
    not find any references to any official reverse lookups for these.

    Adding comments for more case (and some historic behaviour) in order
    to make it easier to follow the logic.

    PR:             279618
    Fixes:          6cb9418289f90
    MFC after:      6 weeks
    Reviewed by:    hrs
    Differential Revision: https://reviews.freebsd.org/D45547

 lib/libc/net/getnameinfo.c | 54 +++++++++++++++++++++++++++++++---------------
 1 file changed, 37 insertions(+), 17 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.