Module: kamailio
Branch: 5.0
Commit: 3883a3174707bbaa3ce836faca035bae9c90c456
URL:
https://github.com/kamailio/kamailio/commit/3883a3174707bbaa3ce836faca035ba…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-03-28T13:34:11+02:00
core: safety check for retrying dns cache find
(cherry picked from commit 9a56b88c1438e2d4f0c5b57c71bbe4e904b1a8e4)
---
Modified: src/core/dns_cache.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3883a3174707bbaa3ce836faca035ba…
Patch:
https://github.com/kamailio/kamailio/commit/3883a3174707bbaa3ce836faca035ba…
---
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;