Skip to content

Commit

Permalink
Merge pull request #955 from buevsan/fix-ipset
Browse files Browse the repository at this point in the history
fix ipset wrong behavior
  • Loading branch information
gthess committed Oct 18, 2023
2 parents 2f0b116 + 23ae0a9 commit 167772f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ipset/ipset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 167772f

Please sign in to comment.