aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/netfilter/ebt_mark.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-10-08 11:35:13 +0200
committerPatrick McHardy <kaber@trash.net>2008-10-08 11:35:13 +0200
commit18219d3f7d6a5bc43825a41e0763158efbdb80d3 (patch)
treeaca133d934ec93fc441d5a26937b2428d23573bd /net/bridge/netfilter/ebt_mark.c
parentd2f26037a38ada4a5d40d1cf0b32bc5289f50312 (diff)
downloadkernel_samsung_smdk4412-18219d3f7d6a5bc43825a41e0763158efbdb80d3.zip
kernel_samsung_smdk4412-18219d3f7d6a5bc43825a41e0763158efbdb80d3.tar.gz
kernel_samsung_smdk4412-18219d3f7d6a5bc43825a41e0763158efbdb80d3.tar.bz2
netfilter: ebtables: do centralized size checking
Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/bridge/netfilter/ebt_mark.c')
-rw-r--r--net/bridge/netfilter/ebt_mark.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bridge/netfilter/ebt_mark.c b/net/bridge/netfilter/ebt_mark.c
index 36723f4..bb02412 100644
--- a/net/bridge/netfilter/ebt_mark.c
+++ b/net/bridge/netfilter/ebt_mark.c
@@ -13,9 +13,10 @@
* Marking a frame doesn't really change anything in the frame anyway.
*/
+#include <linux/module.h>
+#include <linux/netfilter/x_tables.h>
#include <linux/netfilter_bridge/ebtables.h>
#include <linux/netfilter_bridge/ebt_mark_t.h>
-#include <linux/module.h>
static int ebt_target_mark(struct sk_buff *skb, unsigned int hooknr,
const struct net_device *in, const struct net_device *out,
@@ -42,8 +43,6 @@ static int ebt_target_mark_check(const char *tablename, unsigned int hookmask,
const struct ebt_mark_t_info *info = data;
int tmp;
- if (datalen != EBT_ALIGN(sizeof(struct ebt_mark_t_info)))
- return -EINVAL;
tmp = info->target | ~EBT_VERDICT_BITS;
if (BASE_CHAIN && tmp == EBT_RETURN)
return -EINVAL;
@@ -61,6 +60,7 @@ static struct ebt_target mark_target __read_mostly = {
.name = EBT_MARK_TARGET,
.target = ebt_target_mark,
.check = ebt_target_mark_check,
+ .targetsize = XT_ALIGN(sizeof(struct ebt_mark_t_info)),
.me = THIS_MODULE,
};