Module: kamailio Branch: master Commit: 787bbe5c91e9fc02f741fdd26b06ccad87b4c19e URL: https://github.com/kamailio/kamailio/commit/787bbe5c91e9fc02f741fdd26b06ccad87b4c19e
Author: Matteo Brancaleoni <[email protected]> Committer: Henning Westerholt <[email protected]> Date: 2026-01-05T12:58:41+01:00 dmq: Fix DNS resolution corruption when search list is used When `dns_use_search_list=1` (the default), `get_record()` may prepend a "fake CNAME" record to map short hostnames to their expanded form. --- Modified: src/modules/dmq/notification_peer.c --- Diff: https://github.com/kamailio/kamailio/commit/787bbe5c91e9fc02f741fdd26b06ccad87b4c19e.diff Patch: https://github.com/kamailio/kamailio/commit/787bbe5c91e9fc02f741fdd26b06ccad87b4c19e.patch --- diff --git a/src/modules/dmq/notification_peer.c b/src/modules/dmq/notification_peer.c index b41cf477c32..094571eb225 100644 --- a/src/modules/dmq/notification_peer.c +++ b/src/modules/dmq/notification_peer.c @@ -228,6 +228,7 @@ int get_dmq_host_list( for(prec = phead; prec; prec = prec->next) { /********** * o check max + * o skip non-A records (e.g., CNAME) * o create URI **********/ @@ -236,6 +237,11 @@ int get_dmq_host_list( free_rdata_list(phead); return host_cnt; } + /* Skip non-A records - get_record may return CNAME records + * when DNS search list expansion is used */ + if(prec->type != T_A) { + continue; + } len = ip4tosbuf( ((struct a_rdata *)prec->rdata)->ip, pIP, IP4_MAX_STR_SIZE); pIP[len] = '\0'; _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
