summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira <pablo@eurodev.net>2005-06-23 08:51:18 +0000
committerHarald Welte <laforge@gnumonks.org>2005-06-23 08:51:18 +0000
commit5ee88622ef8f38e5f6b6c60ca1ab61d8f93a0e82 (patch)
tree1a87deb1a8775a3a48affc57b095b470e5773740
parent9867e814492275cabfbccd6b30375b0e23eb10cb (diff)
fix deletion of targets where kernel size != userspace size (Pablo Neira)
-rw-r--r--libiptc/libip4tc.c1
-rw-r--r--libiptc/libip6tc.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/libiptc/libip4tc.c b/libiptc/libip4tc.c
index 392a9de1..2e8647cd 100644
--- a/libiptc/libip4tc.c
+++ b/libiptc/libip4tc.c
@@ -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;
}
diff --git a/libiptc/libip6tc.c b/libiptc/libip6tc.c
index 1c1f14e5..8ca5ea66 100644
--- a/libiptc/libip6tc.c
+++ b/libiptc/libip6tc.c
@@ -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;
}