diff options
Diffstat (limited to 'pythonmod')
-rw-r--r-- | pythonmod/pythonmod.c | 3 | ||||
-rw-r--r-- | pythonmod/pythonmod_utils.c | 3 |
2 files changed, 5 insertions, 1 deletions
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 */ |