Module: kamailio
Branch: 5.2
Commit: f24fb5cd5509dd7c539bf1c36b2676220dc1e826
URL:
https://github.com/kamailio/kamailio/commit/f24fb5cd5509dd7c539bf1c36b26762…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-10-02T12:44:25+02:00
core: skip get_record for DNS extensions e.g. for EDNS0 (GH #2087)
(cherry picked from commit aeea940adaddc12c1467a0ac8f5e34d14b1339be)
---
Modified: src/core/resolve.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f24fb5cd5509dd7c539bf1c36b26762…
Patch:
https://github.com/kamailio/kamailio/commit/f24fb5cd5509dd7c539bf1c36b26762…
---
diff --git a/src/core/resolve.c b/src/core/resolve.c
index 80020a96ff..fd74441bf6 100644
--- a/src/core/resolve.c
+++ b/src/core/resolve.c
@@ -937,6 +937,12 @@ struct rdata* get_record(char* name, int type, int flags)
*last=rd;
last=&(rd->next);
break;
+ case T_OPT:
+ /* skip DNS extensions, e.g. EDNS0 */
+ rd->rdata=0;
+ *last=rd;
+ last=&(rd->next);
+ break;
default:
LM_ERR("unknown type %d\n", rtype);
rd->rdata=0;