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

Details

Provenance
glebiusAuthored on Jul 20 2023, 9:56 PM
Reviewer
philip
Differential Revision
D40070: tcp_wrappers: recognize IPv6 addresses/prefixes
Parents
rG9ff45b8ed847: sshd: do not resolve refused client hostname
Branches
Unknown
Tags
Unknown