From 36ca5eede6be2592d764e69e30d3d608cb88ff1a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 8 Nov 2016 19:24:28 +0100 Subject: [PATCH] lua ffi bindings: fix incorrect structs Some structures have changed but lua was still using the old ABI. I think no our lua code used the fields misplaced due to this, except an example in documentation. I didn't check much of the ABI in there. I wish I knew some (half-)automatic way how to do that. --- daemon/lua/kres.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/daemon/lua/kres.lua b/daemon/lua/kres.lua index 96a34649c..c15db945c 100644 --- a/daemon/lua/kres.lua +++ b/daemon/lua/kres.lua @@ -150,7 +150,7 @@ typedef struct { uint16_t pos; uint16_t count; } knot_pktsection_t; -typedef struct { +typedef struct { /* some names differ now in knot */ uint8_t *wire; size_t size; size_t max_size; @@ -161,6 +161,10 @@ typedef struct { uint16_t flags; knot_rrset_t *opt; knot_rrset_t *tsig; + struct { + uint8_t *pos; + size_t len; + } tsig_wire; knot_section_t _current; knot_pktsection_t _sections[3]; size_t _rrset_allocd; @@ -200,6 +204,7 @@ struct kr_query { uint32_t flags; uint32_t secret; uint16_t fails; + uint16_t reorder; struct timeval timestamp; struct kr_zonecut zone_cut; uint8_t _stub[]; /* Do not touch */ -- 2.47.2