Module: kamailio
Branch: 4.4
Commit: e20b38e0084c1f89c43a921a8a2affbea060aaa5
URL:
https://github.com/kamailio/kamailio/commit/e20b38e0084c1f89c43a921a8a2affb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-03-28T13:35:11+02:00
core: safety check for retrying dns cache find
(cherry picked from commit 9a56b88c1438e2d4f0c5b57c71bbe4e904b1a8e4)
(cherry picked from commit 3883a3174707bbaa3ce836faca035bae9c90c456)
---
Modified: dns_cache.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e20b38e0084c1f89c43a921a8a2affb…
Patch:
https://github.com/kamailio/kamailio/commit/e20b38e0084c1f89c43a921a8a2affb…
---
diff --git a/dns_cache.c b/dns_cache.c
index 4273d2f..39bed3d 100644
--- a/dns_cache.c
+++ b/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;