From 08d47756d0a89616bd2d134de46e5f613f293e2b Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 28 Jan 2018 09:17:03 +0100 Subject: [PATCH] executor: fix 32-bit support ipt_get_entries.entrytable must be pointer aligned, so in 32-bit build there is no padding before it. --- executor/common_linux.h | 3 +-- pkg/csource/linux_common.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/executor/common_linux.h b/executor/common_linux.h index 30a5a0c49b1..d636c85f9c7 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -971,8 +971,7 @@ struct ipt_getinfo { struct ipt_get_entries { char name[32]; unsigned int size; - unsigned int pad; - char entrytable[1024]; + void* entrytable[1024 / sizeof(void*)]; }; struct xt_counters { diff --git a/pkg/csource/linux_common.go b/pkg/csource/linux_common.go index 49d7df124e0..b02e6118803 100644 --- a/pkg/csource/linux_common.go +++ b/pkg/csource/linux_common.go @@ -2003,8 +2003,7 @@ struct ipt_getinfo { struct ipt_get_entries { char name[32]; unsigned int size; - unsigned int pad; - char entrytable[1024]; + void* entrytable[1024 / sizeof(void*)]; }; struct xt_counters {