diff options
author | Oto Šťáva <oto.stava@nic.cz> | 2022-03-18 15:22:08 +0100 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2022-03-21 10:56:13 +0100 |
commit | 00be81d248de0eb78dfb4019cf2b78e887ae900e (patch) | |
tree | ff0591093c50c964a3d4e8dae31ac8542f8a4452 /daemon/lua/kres.lua | |
parent | Merge branch 'release-5-5-0' into 'master' (diff) | |
download | knot-resolver-00be81d248de0eb78dfb4019cf2b78e887ae900e.tar.xz knot-resolver-00be81d248de0eb78dfb4019cf2b78e887ae900e.zip |
modules/dns64: fix incorrect packet writes for cached packets
Also change the return type of kr_pkt_has_dnssec() and lua's :dobit()
Diffstat (limited to 'daemon/lua/kres.lua')
-rw-r--r-- | daemon/lua/kres.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/daemon/lua/kres.lua b/daemon/lua/kres.lua index 7a00d232..84198be4 100644 --- a/daemon/lua/kres.lua +++ b/daemon/lua/kres.lua @@ -688,6 +688,12 @@ ffi.metatype( knot_pkt_t, { if ret ~= 0 then return nil, knot_error_t(ret) end return true end, + -- Checks whether the packet has a wire, i.e. the .size is not + -- equal to KR_PKT_SIZE_NOWIRE + has_wire = function (pkt) + assert(ffi.istype(knot_pkt_t, pkt)) + return C.kr_pkt_has_wire(pkt) + end, recycle = function (pkt) assert(ffi.istype(knot_pkt_t, pkt)) local ret = C.kr_pkt_recycle(pkt) |