HardenedBSD/lib
Bjoern A. Zeeb c179937b98 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:		6cb9418289
MFC after:	6 weeks
Reviewed by:	hrs
Differential Revision: https://reviews.freebsd.org/D45547
2024-07-26 11:03:56 +00:00
..
atf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
clang Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
csu Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
flua Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
geom Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
googletest Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
lib9p Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
lib80211 lib80211: Consistently use item count as the first argument to calloc 2024-07-19 13:06:16 -04:00
libalias Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libarchive
libauditd
libbe Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libbearssl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libbegemot Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libblacklist Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libblocksruntime Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libbluetooth
libbsddialog
libbsdstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libbsm
libbsnmp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libbz2 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libc libc/getnameinfo: stop adding NI_NUMERICHOST where inappropriate 2024-07-26 11:03:56 +00:00
libc_nonshared Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libc++ Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libc++experimental Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcalendar Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcam Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcapsicum Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcasper libcasper: Consistently use item count as the first argument to calloc 2024-07-19 13:05:58 -04:00
libcbor Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libclang_rt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcom_err Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcompat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcompiler_rt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcrypt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcuse
libcxxrt libcxxrt: allow build with gcc13 and --no-undefined-version 2024-05-17 21:50:57 +01:00
libdevctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdevdctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdevinfo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdevstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdiff diff: Nits in tests. 2024-05-20 16:27:50 +02:00
libdl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdpv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdwarf
libedit Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libefivar
libelf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libelftc
libevent1 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libexecinfo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libexpat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libfdt
libfetch Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libfido2 libfido2: update to 1.14.0 2024-05-04 12:51:08 -04:00
libfigpar Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libgcc_eh Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libgcc_s Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libgeom libgeom: Consistently use item count as the first argument to calloc 2024-07-19 13:06:03 -04:00
libgpio Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libgssapi Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libiconv_modules Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libifconfig Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libipsec libipsec: decode SADB_X_EXT_IF_HW_OFFL 2024-07-12 06:29:31 +03:00
libipt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libiscsiutil
libjail Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libkiconv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libkvm Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libldns Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
liblua Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
liblutok Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
liblzma Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libmagic
libmd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libmemstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libmilter Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libmixer Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libmp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libmt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libnetbsd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libnetgraph
libnetmap
libnv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libnvmf libnvmf: Reject invalid values of MAXH2CDATA for new associations 2024-07-25 15:32:42 -04:00
libomp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libopenbsd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libopencsd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libpam Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libpathconv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libpcap
libpe
libpfctl pf: convert DIOCGETADDR to netlink 2024-07-22 09:11:49 +02:00
libpjdlog
libpmc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libpmcstat
libproc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libprocstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libradius radlib: fix a memory leak in is_valid_request 2024-06-04 19:40:55 -07:00
libregex Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
librpcsec_gss Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
librpcsvc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
librss Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
librt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
librtld_db Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsbuf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsdp
libsecureboot Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsm Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsmb Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsmdb Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsmutil Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsqlite3 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libssp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libssp_nonshared Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libstats Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libstdbuf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libstdthreads Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsys include: ssp: fortify <sys/socket.h> 2024-07-13 00:16:26 -05:00
libsysdecode Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libtacplus
libtelnet Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libthr Revert "Avoid division in round_up." 2024-07-26 00:11:11 +01:00
libthread_db Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libucl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libufs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libugidfw Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libulog Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libunbound Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libusb libusb: claim to be version 1.0.16 2024-06-28 12:18:34 -04:00
libusbhid libusbhid: add missing include guards 2024-06-06 10:09:05 -04:00
libutil Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libveriexec Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libvgl
libvmmapi
libwrap
libxo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
liby Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libypclnt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libz
libzstd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
msun Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ncurses Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nss_tacplus
ofed Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.inc