[Bug 289198] inet_net_pton is broken with AF_INET6

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289198

--- Comment #5 from [email protected] ---
A commit in branch stable/15 references this bug:

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

commit ff7a10d0e1d1498724c6a1e02a70926944a71590
Author:     Lexi Winter <[email protected]>
AuthorDate: 2025-10-18 14:18:40 +0000
Commit:     Colin Percival <[email protected]>
CommitDate: 2025-10-23 00:36:51 +0000

    libc: Import OpenBSD's inet_net_{ntop,pton}

    Our versions of these functions (originally taken from BIND) simply
    don't work correctly for AF_INET6.  These were removed from BIND itself
    quite a while ago, but OpenBSD has made several fixes in the mean time,
    so import their code.

    Add tests for both functions.

    PR:             289198
    Reported by:    Nico Sonack <[email protected]>
    MFC after:      1 week
    Reviewed by:    des
    Obtained from:  OpenBSD (lib/libc/net)
    Sponsored by:   https://www.patreon.com/bsdivy
    Differential Revision:  https://reviews.freebsd.org/D52629

    (cherry picked from commit 8f4a0d2f7b96099001dbc51e06114df1a0e6d291)

 lib/libc/inet/inet_net_ntop.c             | 206 +++++------------
 lib/libc/inet/inet_net_pton.c             | 363 +++++++++---------------------
 lib/libc/tests/net/Makefile               |   2 +
 lib/libc/tests/net/inet_net_test.cc (new) | 333 +++++++++++++++++++++++++++
 4 files changed, 492 insertions(+), 412 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.