summaryrefslogtreecommitdiffstats
path: root/net/ipv6/netfilter/ip6t_LOG.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_LOG.c
parentaa83c1ab4384c0905527c84e5135a56daa885834 (diff)
downloadop-kernel-dev-7f9397138e297904bf1c717651183e785a01ff13.zip
op-kernel-dev-7f9397138e297904bf1c717651183e785a01ff13.tar.gz
[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_LOG.c')
-rw-r--r--net/ipv6/netfilter/ip6t_LOG.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index 6b930ef..6a3a2da 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -455,29 +455,22 @@ static int ip6t_log_checkentry(const char *tablename,
{
const struct ip6t_log_info *loginfo = targinfo;
- if (targinfosize != IP6T_ALIGN(sizeof(struct ip6t_log_info))) {
- DEBUGP("LOG: targinfosize %u != %u\n",
- targinfosize, IP6T_ALIGN(sizeof(struct ip6t_log_info)));
- return 0;
- }
-
if (loginfo->level >= 8) {
DEBUGP("LOG: level %u >= 8\n", loginfo->level);
return 0;
}
-
if (loginfo->prefix[sizeof(loginfo->prefix)-1] != '\0') {
DEBUGP("LOG: prefix term %i\n",
loginfo->prefix[sizeof(loginfo->prefix)-1]);
return 0;
}
-
return 1;
}
static struct ip6t_target ip6t_log_reg = {
.name = "LOG",
.target = ip6t_log_target,
+ .targetsize = sizeof(struct ip6t_log_info),
.checkentry = ip6t_log_checkentry,
.me = THIS_MODULE,
};
OpenPOWER on IntegriCloud