Expand description
CIDR-based ACL host patterns (KIP-1276).
Kafka 4.4 lets an ACL host be a CIDR range such as 10.0.0.0/8 or
2001:db8::/32, not only a single address or the * wildcard. This module
is the parser CreateAcls validation uses to reject a malformed CIDR up
front, and the range test the authorizer uses to match a peer address
against a stored CIDR ACL. Two call sites, one implementation, so they
cannot drift.
No CIDR crate is a dependency of this workspace, so the range test is
hand-rolled from std::net address bytes rather than pulling one in for
a single prefix-mask comparison.
Structsยง
- Cidr
- A parsed
<ip>/<prefix-len>CIDR host pattern.