diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2008-10-08 05:35:13 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-10-08 05:35:13 -0400 |
commit | 18219d3f7d6a5bc43825a41e0763158efbdb80d3 (patch) | |
tree | aca133d934ec93fc441d5a26937b2428d23573bd /net/bridge/netfilter/ebt_nflog.c | |
parent | d2f26037a38ada4a5d40d1cf0b32bc5289f50312 (diff) |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/netfilter/ebt_nflog.c b/net/bridge/netfilter/ebt_nflog.c index 8e799aa9e56..88ceb5eb849 100644 --- a/net/bridge/netfilter/ebt_nflog.c +++ b/net/bridge/netfilter/ebt_nflog.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/netfilter/x_tables.h> | ||
17 | #include <linux/netfilter_bridge/ebtables.h> | 18 | #include <linux/netfilter_bridge/ebtables.h> |
18 | #include <linux/netfilter_bridge/ebt_nflog.h> | 19 | #include <linux/netfilter_bridge/ebt_nflog.h> |
19 | #include <net/netfilter/nf_log.h> | 20 | #include <net/netfilter/nf_log.h> |
@@ -42,8 +43,6 @@ static int ebt_nflog_check(const char *tablename, | |||
42 | { | 43 | { |
43 | struct ebt_nflog_info *info = (struct ebt_nflog_info *)data; | 44 | struct ebt_nflog_info *info = (struct ebt_nflog_info *)data; |
44 | 45 | ||
45 | if (datalen != EBT_ALIGN(sizeof(struct ebt_nflog_info))) | ||
46 | return -EINVAL; | ||
47 | if (info->flags & ~EBT_NFLOG_MASK) | 46 | if (info->flags & ~EBT_NFLOG_MASK) |
48 | return -EINVAL; | 47 | return -EINVAL; |
49 | info->prefix[EBT_NFLOG_PREFIX_SIZE - 1] = '\0'; | 48 | info->prefix[EBT_NFLOG_PREFIX_SIZE - 1] = '\0'; |
@@ -54,6 +53,7 @@ static struct ebt_watcher nflog __read_mostly = { | |||
54 | .name = EBT_NFLOG_WATCHER, | 53 | .name = EBT_NFLOG_WATCHER, |
55 | .watcher = ebt_nflog, | 54 | .watcher = ebt_nflog, |
56 | .check = ebt_nflog_check, | 55 | .check = ebt_nflog_check, |
56 | .targetsize = XT_ALIGN(sizeof(struct ebt_nflog_info)), | ||
57 | .me = THIS_MODULE, | 57 | .me = THIS_MODULE, |
58 | }; | 58 | }; |
59 | 59 | ||