Module: kamailio
Branch: master
Commit: aeea940adaddc12c1467a0ac8f5e34d14b1339be
URL:
https://github.com/kamailio/kamailio/commit/aeea940adaddc12c1467a0ac8f5e34d…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-10-01T16:41:19+02:00
core: skip get_record for DNS extensions e.g. for EDNS0 (GH #2087)
---
Modified: src/core/resolve.c
---
Diff:
https://github.com/kamailio/kamailio/commit/aeea940adaddc12c1467a0ac8f5e34d…
Patch:
https://github.com/kamailio/kamailio/commit/aeea940adaddc12c1467a0ac8f5e34d…
---
diff --git a/src/core/resolve.c b/src/core/resolve.c
index 5169c85cab..de5a30398e 100644
--- a/src/core/resolve.c
+++ b/src/core/resolve.c
@@ -951,6 +951,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;