Skip to content

Commit

Permalink
core: safety check for retrying dns cache find
Browse files Browse the repository at this point in the history
(cherry picked from commit 9a56b88)
(cherry picked from commit 3883a31)
  • Loading branch information
miconda committed Mar 28, 2017
1 parent fc4cfe9 commit e20b38e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dns_cache.c
Expand Up @@ -597,8 +597,10 @@ inline static struct dns_hash_entry* _dns_hash_find(str* name, int type,
cname_chain++;
cname.s=((struct cname_rdata*)e->rr_lst->rdata)->name;
cname.len= ((struct cname_rdata*)e->rr_lst->rdata)->name_len;
name=&cname;
goto again;
if(cname.s!=NULL && cname.len>0) {
name=&cname;
goto again;
}
}
}
return ret;
Expand Down

0 comments on commit e20b38e

Please sign in to comment.