Module: kamailio
Branch: master
Commit: 9a56b88c1438e2d4f0c5b57c71bbe4e904b1a8e4
URL:
https://github.com/kamailio/kamailio/commit/9a56b88c1438e2d4f0c5b57c71bbe4e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-03-27T21:00:08+02:00
core: safety check for retrying dns cache find
---
Modified: src/core/dns_cache.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9a56b88c1438e2d4f0c5b57c71bbe4e…
Patch:
https://github.com/kamailio/kamailio/commit/9a56b88c1438e2d4f0c5b57c71bbe4e…
---
diff --git a/src/core/dns_cache.c b/src/core/dns_cache.c
index 4273d2f..39bed3d 100644
--- a/src/core/dns_cache.c
+++ b/src/core/dns_cache.c
@@ -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;