summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libiptc/libiptc.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/libiptc/libiptc.h b/include/libiptc/libiptc.h
index 9058cff..fa0a4ea 100644
--- a/include/libiptc/libiptc.h
+++ b/include/libiptc/libiptc.h
@@ -6,9 +6,13 @@
#include <linux/netfilter_ipv4/ip_tables.h>
#ifndef IPT_MIN_ALIGN
-#define IPT_MIN_ALIGN (__alignof__(struct ipt_entry_match))
+/* ipt_entry has pointers and u_int64_t's in it, so if you align to
+ it, you'll also align to any crazy matches and targets someone
+ might write */
+#define IPT_MIN_ALIGN (__alignof__(struct ipt_entry))
#endif
-#define IPT_ALIGN(s) (((s) + (IPT_MIN_ALIGN-1)) & ~(IPT_MIN_ALIGN-1))
+
+#define IPT_ALIGN(s) (((s) + ((IPT_MIN_ALIGN)-1)) & ~((IPT_MIN_ALIGN)-1))
typedef char ipt_chainlabel[32];