summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRusty Russell <rusty@linuxcare.com.au>2000-05-10 00:24:01 +0000
committerRusty Russell <rusty@rustcorp.com.au>2000-05-10 00:24:01 +0000
commit3eee010524ae02a3f0786b6d02bef16ab122e1c3 (patch)
tree07e5d49f87d467b436c12811b9983840eec34db5
parent28381a4a8da8c967938de3981644190219380de4 (diff)
Alignment assertion fix.
-rw-r--r--libiptc/libip4tc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libiptc/libip4tc.c b/libiptc/libip4tc.c
index 10ea1be2..57a6fb65 100644
--- a/libiptc/libip4tc.c
+++ b/libiptc/libip4tc.c
@@ -99,6 +99,7 @@ typedef unsigned int socklen_t;
#define LABEL_RETURN IPTC_LABEL_RETURN
#define LABEL_ACCEPT IPTC_LABEL_ACCEPT
#define LABEL_DROP IPTC_LABEL_DROP
+#define LABEL_QUEUE IPTC_LABEL_QUEUE
#define ALIGN IPT_ALIGN
#define RETURN IPT_RETURN
@@ -406,8 +407,9 @@ do_check(TC_HANDLE_T h, unsigned int line)
e = get_entry(h, get_chain_end(h, h->info.hook_entry[i]));
assert(unconditional(&e->ip));
assert(e->target_offset == sizeof(*e));
- assert(e->next_offset == sizeof(*e) + sizeof(*t));
t = (STRUCT_STANDARD_TARGET *)GET_TARGET(e);
+ assert(t->target.u.target_size == IPT_ALIGN(sizeof(*t)));
+ assert(e->next_offset == sizeof(*e) + IPT_ALIGN(sizeof(*t)));
assert(strcmp(t->target.u.user.name, STANDARD_TARGET)==0);
assert(t->verdict == -NF_DROP-1 || t->verdict == -NF_ACCEPT-1);