Skip to content

Conversation

@TomCan
Copy link

@TomCan TomCan commented Oct 24, 2025

In dual stack environments, r->useragent_addr might return an IPv4 mapped IPv6 address instead of a regular IPv4 address. In that case, apr_sockaddr_t->family will return AF_INET6 instead of AF_INET and will not take any IPv4 entries on the whitelist into account. This can results in whitelisted IPv4 address to be blocked anyway.

This PR solves this by adding additional checks to see if this is in fact an IPv4 mapped IPv6 address, and adjusts the matching logic accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant