summaryrefslogtreecommitdiff
path: root/net/ipv4/netfilter/ipt_ecn.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-03-21 05:01:14 +0300
committerDavid S. Miller <davem@davemloft.net>2006-03-21 05:01:14 +0300
commit1d5cd90976fa0d1cc21554b9d43f5c517323ebfc (patch)
tree3eb43557a1d23c71ea41b91e4ee001ac43b8ba21 /net/ipv4/netfilter/ipt_ecn.c
parent3cdc7c953eb1e1e1d1b82adbd140bf3451c165b1 (diff)
downloadlinux-1d5cd90976fa0d1cc21554b9d43f5c517323ebfc.tar.xz
[NETFILTER]: Convert ip_tables matches/targets to centralized error checking
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/netfilter/ipt_ecn.c')
-rw-r--r--net/ipv4/netfilter/ipt_ecn.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/netfilter/ipt_ecn.c b/net/ipv4/netfilter/ipt_ecn.c
index e68b0c7981f0..723957f77310 100644
--- a/net/ipv4/netfilter/ipt_ecn.c
+++ b/net/ipv4/netfilter/ipt_ecn.c
@@ -92,9 +92,6 @@ static int checkentry(const char *tablename, const void *ip_void,
const struct ipt_ecn_info *info = matchinfo;
const struct ipt_ip *ip = ip_void;
- if (matchsize != IPT_ALIGN(sizeof(struct ipt_ecn_info)))
- return 0;
-
if (info->operation & IPT_ECN_OP_MATCH_MASK)
return 0;
@@ -113,8 +110,9 @@ static int checkentry(const char *tablename, const void *ip_void,
static struct ipt_match ecn_match = {
.name = "ecn",
- .match = &match,
- .checkentry = &checkentry,
+ .match = match,
+ .matchsize = sizeof(struct ipt_ecn_info),
+ .checkentry = checkentry,
.me = THIS_MODULE,
};