Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ldns-blocking: fix another corner case with suffix matching
Ruleset: ``` *.example.com ru.example.com ``` A query for `xru.example.com` would find `ru.example.com` as the longest suffix. The expression didn't match since this is neither an exact match nor a match that stops at a label. However, this was ignoring the fact that there a different, shorter rule could match. This is pretty annoying, as keeping our promise to log the longest match means that we need at least yet another lookup in that specific case. Alternatively, the fpst lookup function could be specialized to stop at labels, but that would defeat the point of this example plugin. So, perform an extra lookup after striping the first (last, once the name is reversed) label.
- Loading branch information