mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-02 19:59:28 -05:00
fix ipset wrong behavior
Issue description:
If local zone directive is assigned as following:
"local-zone domain.com ipset"
then any answers for query with names such as
"anytext1domain.com" or "example2domain.com"
will be added to ipset.
This commit fixes this issue.
This commit is contained in:
parent
4b627bd29e
commit
23ae0a9838
1 changed files with 2 additions and 2 deletions
|
|
@ -158,10 +158,10 @@ ipset_check_zones_for_rrset(struct module_env *env, struct ipset_env *ie,
|
|||
qs = NULL;
|
||||
plen = strlen(p->str);
|
||||
|
||||
if (dlen >= plen) {
|
||||
if (dlen == plen || (dlen > plen && dname[dlen - plen - 1] == '.' )) {
|
||||
ds = dname + (dlen - plen);
|
||||
}
|
||||
if (qlen >= plen) {
|
||||
if (qlen == plen || (qlen > plen && qname[qlen - plen - 1] == '.' )) {
|
||||
qs = qname + (qlen - plen);
|
||||
}
|
||||
if ((ds && strncasecmp(p->str, ds, plen) == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue