HomeFreeBSD

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

Description

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 <nsonack@herrhotzenplotz.de>
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)

Details

Provenance
ivyAuthored on Oct 18 2025, 2:18 PM
cpercivaCommitted on Oct 23 2025, 12:36 AM
Reviewer
des
Differential Revision
D52629: libc: Import OpenBSD's inet_net_{ntop,pton}
Parents
rGef82bdc864c5: Makefile: Don't allow install{world,kernel} with pkgbase
Branches
Unknown
Tags
Unknown