]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Alignment assertion fix.
authorRusty Russell <rusty@linuxcare.com.au>
Wed, 10 May 2000 00:24:01 +0000 (00:24 +0000)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 10 May 2000 00:24:01 +0000 (00:24 +0000)
libiptc/libip4tc.c

index 10ea1be26eccd4435dc6d70d9c160acd988fa20e..57a6fb65431dadff3f806553472dd43f4c487055 100644 (file)
@@ -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);