]> git.kaiwu.me - haproxy.git/commit
MINOR: tools: add is_ip_untrusted() to check for non-local addresses
authorWilly Tarreau <w@1wt.eu>
Tue, 3 Nov 2026 13:57:53 +0000 (14:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:32 +0000 (22:45 +0100)
commit811f9ecaf3964a19ab729415119e77509981e886
tree9aa37476cc1ba39a7d350e85cda941fe3ab4fef9
parentcb30bf0bcd5ca4cb5508e05019e8e31a0b55d534
MINOR: tools: add is_ip_untrusted() to check for non-local addresses

The function will return true for non-local ipv4/ipv6 addresses only.
Some are between the two (benchmark, doc, examples, cgn etc) and are
intentionally reported as non-local hence untrusted as well, the
rationale being that they're normally not deployed for production so
they shouldn't be taken for trusted local addresses. This will be
used in future commits.
include/haproxy/tools.h
src/tools.c