diff options
author | rusty <rusty> | 2000-04-27 10:28:06 +0000 |
---|---|---|
committer | rusty <rusty> | 2000-04-27 10:28:06 +0000 |
commit | c75fc6b4c761bfee3401bbf480cf6c3e8fb400a9 (patch) | |
tree | a222782f5d77b7cae3b5f9c04097c3ac257216a4 /include/libiptc/libiptc.h | |
parent | 68a35d8701ecd8cd401ce76880f9dc65efea5b2a (diff) |
Alignment fixes (requires kernel patch).
Diffstat (limited to 'include/libiptc/libiptc.h')
-rw-r--r-- | include/libiptc/libiptc.h | 8 |
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]; |