]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
fix deletion of targets where kernel size != userspace size (Pablo Neira)
authorPablo Neira <pablo@eurodev.net>
Thu, 23 Jun 2005 08:51:18 +0000 (08:51 +0000)
committerHarald Welte <laforge@gnumonks.org>
Thu, 23 Jun 2005 08:51:18 +0000 (08:51 +0000)
libiptc/libip4tc.c
libiptc/libip6tc.c

index 392a9de10d640924d5557760716074e2e39cfbd3..2e8647cdc9551a433e243a54c423ad06b8aa3079 100644 (file)
@@ -210,6 +210,7 @@ is_same(const STRUCT_ENTRY *a, const STRUCT_ENTRY *b, unsigned char *matchmask)
        mptr = matchmask + sizeof(STRUCT_ENTRY);
        if (IPT_MATCH_ITERATE(a, match_different, a->elems, b->elems, &mptr))
                return NULL;
+       mptr += IPT_ALIGN(sizeof(struct ipt_entry_target));
 
        return mptr;
 }
index 1c1f14e5eaea5c0b0412c60db8435fae4a1b8196..8ca5ea66c64d1536b2cdfa65d5f50f51c23531b5 100644 (file)
@@ -242,6 +242,7 @@ is_same(const STRUCT_ENTRY *a, const STRUCT_ENTRY *b,
        mptr = matchmask + sizeof(STRUCT_ENTRY);
        if (IP6T_MATCH_ITERATE(a, match_different, a->elems, b->elems, &mptr))
                return NULL;
+       mptr += IP6T_ALIGN(sizeof(struct ip6t_entry_target));
 
        return mptr;
 }