From a6533d88996e7570cf04db0d99b6012d25a953d3 Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Sat, 3 Sep 2016 15:08:13 +0000 Subject: import unbound 1.5.9 --- pythonmod/pythonmod.c | 3 +++ pythonmod/pythonmod_utils.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'pythonmod') diff --git a/pythonmod/pythonmod.c b/pythonmod/pythonmod.c index 48dbc01698cb..6c5e6392df4b 100644 --- a/pythonmod/pythonmod.c +++ b/pythonmod/pythonmod.c @@ -141,6 +141,9 @@ int pythonmod_init(struct module_env* env, int id) #endif Py_SetProgramName(progname); Py_NoSiteFlag = 1; +#if PY_MAJOR_VERSION >= 3 + PyImport_AppendInittab(SWIG_name, (void*)SWIG_init); +#endif Py_Initialize(); PyEval_InitThreads(); SWIG_init(); diff --git a/pythonmod/pythonmod_utils.c b/pythonmod/pythonmod_utils.c index 5120074e839a..ae694d57693a 100644 --- a/pythonmod/pythonmod_utils.c +++ b/pythonmod/pythonmod_utils.c @@ -129,7 +129,8 @@ int createResponse(struct module_qstate* qstate, sldns_buffer* pkt) return 0; } /* edns is not examined, but removed from message to help cache */ - if(parse_extract_edns(prs, &edns) != LDNS_RCODE_NOERROR) + if(parse_extract_edns(prs, &edns, qstate->env->scratch) != + LDNS_RCODE_NOERROR) return 0; /* remove CD-bit, we asked for in case we handle validation ourself */ -- cgit v1.3