summaryrefslogtreecommitdiff
path: root/net/ipv6/netfilter/ip6t_dst.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-03-20 18:01:43 -0800
committerDavid S. Miller <davem@davemloft.net>2006-03-20 18:01:43 -0800
commit7f9397138e297904bf1c717651183e785a01ff13 (patch)
tree67b39ba381e8ffd2340d002a118252be0fc2e923 /net/ipv6/netfilter/ip6t_dst.c
parentaa83c1ab4384c0905527c84e5135a56daa885834 (diff)
[NETFILTER]: Convert ip6_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/ipv6/netfilter/ip6t_dst.c')
-rw-r--r--net/ipv6/netfilter/ip6t_dst.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/net/ipv6/netfilter/ip6t_dst.c b/net/ipv6/netfilter/ip6t_dst.c
index b4c153a5350..2fbde5944e0 100644
--- a/net/ipv6/netfilter/ip6t_dst.c
+++ b/net/ipv6/netfilter/ip6t_dst.c
@@ -185,16 +185,10 @@ checkentry(const char *tablename,
{
const struct ip6t_opts *optsinfo = matchinfo;
- if (matchinfosize != IP6T_ALIGN(sizeof(struct ip6t_opts))) {
- DEBUGP("ip6t_opts: matchsize %u != %u\n",
- matchinfosize, IP6T_ALIGN(sizeof(struct ip6t_opts)));
- return 0;
- }
if (optsinfo->invflags & ~IP6T_OPTS_INV_MASK) {
DEBUGP("ip6t_opts: unknown flags %X\n", optsinfo->invflags);
return 0;
}
-
return 1;
}
@@ -204,8 +198,9 @@ static struct ip6t_match opts_match = {
#else
.name = "dst",
#endif
- .match = &match,
- .checkentry = &checkentry,
+ .match = match,
+ .matchsize = sizeof(struct ip6t_opts),
+ .checkentry = checkentry,
.me = THIS_MODULE,
};