aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/netfilter/ebt_nflog.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_nflog.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_nflog.c')
-rw-r--r--net/bridge/netfilter/ebt_nflog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/netfilter/ebt_nflog.c b/net/bridge/netfilter/ebt_nflog.c
index 8e799aa..88ceb5e 100644
--- a/net/bridge/netfilter/ebt_nflog.c
+++ b/net/bridge/netfilter/ebt_nflog.c
@@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/spinlock.h>
+#include <linux/netfilter/x_tables.h>
#include <linux/netfilter_bridge/ebtables.h>
#include <linux/netfilter_bridge/ebt_nflog.h>
#include <net/netfilter/nf_log.h>
@@ -42,8 +43,6 @@ static int ebt_nflog_check(const char *tablename,
{
struct ebt_nflog_info *info = (struct ebt_nflog_info *)data;
- if (datalen != EBT_ALIGN(sizeof(struct ebt_nflog_info)))
- return -EINVAL;
if (info->flags & ~EBT_NFLOG_MASK)
return -EINVAL;
info->prefix[EBT_NFLOG_PREFIX_SIZE - 1] = '\0';
@@ -54,6 +53,7 @@ static struct ebt_watcher nflog __read_mostly = {
.name = EBT_NFLOG_WATCHER,
.watcher = ebt_nflog,
.check = ebt_nflog_check,
+ .targetsize = XT_ALIGN(sizeof(struct ebt_nflog_info)),
.me = THIS_MODULE,
};