From: Vladimír Čunát Date: Mon, 8 Apr 2019 15:55:37 +0000 (+0200) Subject: fixup! modules/http DoH: allocate req.qsource on req.pool X-Git-Tag: v4.0.0~10^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99d66de67c495a8b324135c8a64d18a721d552df;p=thirdparty%2Fknot-resolver.git fixup! modules/http DoH: allocate req.qsource on req.pool --- diff --git a/modules/http/http_doh.lua b/modules/http/http_doh.lua index e7a8f2a86..fb4283ae1 100644 --- a/modules/http/http_doh.lua +++ b/modules/http/http_doh.lua @@ -9,8 +9,11 @@ local function get_http_ttl(pkt) end local function convert_sockaddr(pool, family, ipaddr, port) - local res = ffi.C.kr_straddr_socket(ipaddr, port, pool) -- resilient to bad parameters - if not (family and ipaddr and port and res ~= nil) then + local res = nil + if family and ipaddr and port then + res = ffi.C.kr_straddr_socket(ipaddr, port, pool) + end + if not res then panic('failed to obtain peer IP address') end return res