Module: kamailio
Branch: 5.1
Commit: f2920c4681e10b852e94a3378e1f6920597593ae
URL:
https://github.com/kamailio/kamailio/commit/f2920c4681e10b852e94a3378e1f692…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-10-02T12:44:39+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/f2920c4681e10b852e94a3378e1f692…
Patch:
https://github.com/kamailio/kamailio/commit/f2920c4681e10b852e94a3378e1f692…
---
diff --git a/src/core/resolve.c b/src/core/resolve.c
index 2b1441e36d..a5ffb86d7d 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;