diff options
author | Rusty Russell <rusty@linuxcare.com.au> | 2000-04-27 10:28:06 +0000 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2000-04-27 10:28:06 +0000 |
commit | 228e98dd6303af11925235af4cf3c3ec450f3f41 (patch) | |
tree | a222782f5d77b7cae3b5f9c04097c3ac257216a4 /include | |
parent | f3b36fe906d6dc80a568eb427e6b2ffa4093fdf3 (diff) |
Alignment fixes (requires kernel patch).
Diffstat (limited to 'include')
-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 9058cffc..fa0a4eaf 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]; |