Commit aa83c1ab authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[NETFILTER]: Convert arp_tables targets to centralized error checking

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1d5cd909
...@@ -1143,11 +1143,13 @@ void arpt_unregister_table(struct arpt_table *table) ...@@ -1143,11 +1143,13 @@ void arpt_unregister_table(struct arpt_table *table)
/* The built-in targets: standard (NULL) and error. */ /* The built-in targets: standard (NULL) and error. */
static struct arpt_target arpt_standard_target = { static struct arpt_target arpt_standard_target = {
.name = ARPT_STANDARD_TARGET, .name = ARPT_STANDARD_TARGET,
.targetsize = sizeof(int),
}; };
static struct arpt_target arpt_error_target = { static struct arpt_target arpt_error_target = {
.name = ARPT_ERROR_TARGET, .name = ARPT_ERROR_TARGET,
.target = arpt_error, .target = arpt_error,
.targetsize = ARPT_FUNCTION_MAXNAMELEN,
}; };
static struct nf_sockopt_ops arpt_sockopts = { static struct nf_sockopt_ops arpt_sockopts = {
......
...@@ -80,12 +80,12 @@ checkentry(const char *tablename, const void *e, void *targinfo, ...@@ -80,12 +80,12 @@ checkentry(const char *tablename, const void *e, void *targinfo,
return 1; return 1;
} }
static struct arpt_target arpt_mangle_reg static struct arpt_target arpt_mangle_reg = {
= { .name = "mangle",
.name = "mangle", .target = target,
.target = target, .targetsize = sizeof(struct arpt_mangle),
.checkentry = checkentry, .checkentry = checkentry,
.me = THIS_MODULE, .me = THIS_MODULE,
}; };
static int __init init(void) static int __init init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment