summaryrefslogtreecommitdiffstats
path: root/net/bridge/netfilter/ebt_arpreply.c
diff options
context:
space:
mode:
authorJan Engelhardt2008-10-08 11:35:13 +0200
committerPatrick McHardy2008-10-08 11:35:13 +0200
commit18219d3f7d6a5bc43825a41e0763158efbdb80d3 (patch)
treeaca133d934ec93fc441d5a26937b2428d23573bd /net/bridge/netfilter/ebt_arpreply.c
parentnetfilter: Add documentation for tproxy (diff)
downloadkernel-qcow2-linux-18219d3f7d6a5bc43825a41e0763158efbdb80d3.tar.gz
kernel-qcow2-linux-18219d3f7d6a5bc43825a41e0763158efbdb80d3.tar.xz
kernel-qcow2-linux-18219d3f7d6a5bc43825a41e0763158efbdb80d3.zip
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_arpreply.c')
-rw-r--r--net/bridge/netfilter/ebt_arpreply.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c
index 0c4279590fc7..a860ea6da46a 100644
--- a/net/bridge/netfilter/ebt_arpreply.c
+++ b/net/bridge/netfilter/ebt_arpreply.c
@@ -8,12 +8,12 @@
* August, 2003
*
*/
-
-#include <linux/netfilter_bridge/ebtables.h>
-#include <linux/netfilter_bridge/ebt_arpreply.h>
#include <linux/if_arp.h>
#include <net/arp.h>
#include <linux/module.h>
+#include <linux/netfilter/x_tables.h>
+#include <linux/netfilter_bridge/ebtables.h>
+#include <linux/netfilter_bridge/ebt_arpreply.h>
static int ebt_target_reply(struct sk_buff *skb, unsigned int hooknr,
const struct net_device *in, const struct net_device *out,
@@ -63,8 +63,6 @@ static int ebt_target_reply_check(const char *tablename, unsigned int hookmask,
{
const struct ebt_arpreply_info *info = data;
- if (datalen != EBT_ALIGN(sizeof(struct ebt_arpreply_info)))
- return -EINVAL;
if (BASE_CHAIN && info->target == EBT_RETURN)
return -EINVAL;
if (e->ethproto != htons(ETH_P_ARP) ||
@@ -80,6 +78,7 @@ static struct ebt_target reply_target __read_mostly = {
.name = EBT_ARPREPLY_TARGET,
.target = ebt_target_reply,
.check = ebt_target_reply_check,
+ .targetsize = XT_ALIGN(sizeof(struct ebt_arpreply_info)),
.me = THIS_MODULE,
};