summaryrefslogtreecommitdiff
path: root/usr.sbin/unbound/ipset/ipset.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/unbound/ipset/ipset.c')
-rw-r--r--usr.sbin/unbound/ipset/ipset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/unbound/ipset/ipset.c b/usr.sbin/unbound/ipset/ipset.c
index c61ebc205ee..af55de8d6fc 100644
--- a/usr.sbin/unbound/ipset/ipset.c
+++ b/usr.sbin/unbound/ipset/ipset.c
@@ -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)