HomeFreeBSD

tcp_wrappers: recognize IPv6 addresses/prefixes

Description

tcp_wrappers: recognize IPv6 addresses/prefixes

Intentionally or not, but the libwrap was written in such manner that
if your /etc/hosts.allow doesn't have any domain names, neither smart
keywords like LOCAL or KNOWN, then it will not try to resolve the
client address during the hosts check. This was achieved with the
NOT_INADDR() check that matched IPv4 addresses/prefixes. Extend this
to also skip resolve if client list token looks like IPv6.

Reviewed by: philip, emaste
PR: 269456
Differential revision: https://reviews.freebsd.org/D40070

(cherry picked from commit 1d9722de6f90c3edf286b077938bfa696e728d6c)

Details

Provenance
glebiusAuthored on Jul 20 2023, 9:56 PM
emasteCommitted on Dec 21 2023, 2:23 PM
Reviewer
philip
Differential Revision
D40070: tcp_wrappers: recognize IPv6 addresses/prefixes
Parents
rG706303829968: Ensure 'struct thread' is aligned to a cache line
Branches
Unknown
Tags
Unknown