[sr-dev] git:master:29a35ec3: core: fix returning multiple IPs for a cached DNS entry

Daniel-Constantin Mierla miconda at gmail.com
Tue Mar 24 11:24:59 CET 2020


Module: kamailio
Branch: master
Commit: 29a35ec3cec8b9c3ee4b45c8d84308701bda097c
URL: https://github.com/kamailio/kamailio/commit/29a35ec3cec8b9c3ee4b45c8d84308701bda097c

Author: Nathan Bruning <nathan at iperity.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-03-24T11:24:28+01:00

core: fix returning multiple IPs for a cached DNS entry

---

Modified: src/core/dns_cache.c

---

Diff:  https://github.com/kamailio/kamailio/commit/29a35ec3cec8b9c3ee4b45c8d84308701bda097c.diff
Patch: https://github.com/kamailio/kamailio/commit/29a35ec3cec8b9c3ee4b45c8d84308701bda097c.patch

---

diff --git a/src/core/dns_cache.c b/src/core/dns_cache.c
index 8f3f4aeaf9..81fc6a9e45 100644
--- a/src/core/dns_cache.c
+++ b/src/core/dns_cache.c
@@ -2304,6 +2304,7 @@ inline static struct hostent* dns_entry2he(struct dns_hash_entry* e)
 						return 0;
 				}
 				memcpy(p_addr[i], ip, len);
+				rr_no++;
 	}
 	if (i==0){
 		LM_DBG("no good records found (%d) for %.*s (%d)\n",




More information about the sr-dev mailing list