aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/ipt_ULOG.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-03-20 18:01:14 -0800
committerDavid S. Miller <davem@davemloft.net>2006-03-20 18:01:14 -0800
commit1d5cd90976fa0d1cc21554b9d43f5c517323ebfc (patch)
tree3eb43557a1d23c71ea41b91e4ee001ac43b8ba21 /net/ipv4/netfilter/ipt_ULOG.c
parent[NETFILTER]: Change {ip,ip6,arp}_tables to use centralized error checking (diff)
downloadlinux-dev-1d5cd90976fa0d1cc21554b9d43f5c517323ebfc.tar.xz
linux-dev-1d5cd90976fa0d1cc21554b9d43f5c517323ebfc.zip
[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_ULOG.c')
-rw-r--r--net/ipv4/netfilter/ipt_ULOG.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
index 180a9ea57b69..c95e7e9f74ff 100644
--- a/net/ipv4/netfilter/ipt_ULOG.c
+++ b/net/ipv4/netfilter/ipt_ULOG.c
@@ -345,36 +345,30 @@ static int ipt_ulog_checkentry(const char *tablename,
{
struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *) targinfo;
- if (targinfosize != IPT_ALIGN(sizeof(struct ipt_ulog_info))) {
- DEBUGP("ipt_ULOG: targinfosize %u != 0\n", targinfosize);
- return 0;
- }
-
if (loginfo->prefix[sizeof(loginfo->prefix) - 1] != '\0') {
DEBUGP("ipt_ULOG: prefix term %i\n",
loginfo->prefix[sizeof(loginfo->prefix) - 1]);
return 0;
}
-
if (loginfo->qthreshold > ULOG_MAX_QLEN) {
DEBUGP("ipt_ULOG: queue threshold %i > MAX_QLEN\n",
loginfo->qthreshold);
return 0;
}
-
return 1;
}
static struct ipt_target ipt_ulog_reg = {
.name = "ULOG",
.target = ipt_ulog_target,
+ .targetsize = sizeof(struct ipt_ulog_info),
.checkentry = ipt_ulog_checkentry,
.me = THIS_MODULE,
};
static struct nf_logger ipt_ulog_logger = {
.name = "ipt_ULOG",
- .logfn = &ipt_logfn,
+ .logfn = ipt_logfn,
.me = THIS_MODULE,
};