[NETFILTER]: Convert arp_tables targets to centralized error checking
authorPatrick McHardy <kaber@trash.net>
Tue, 21 Mar 2006 02:01:28 +0000 (18:01 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Mar 2006 02:01:28 +0000 (18:01 -0800)
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/arpt_mangle.c

index 2fdf75da7a707b6952e4549811842781e938cd69..6162d0e328eca371557b2c7e563f043c2271c572 100644 (file)
@@ -1143,11 +1143,13 @@ void arpt_unregister_table(struct arpt_table *table)
 /* The built-in targets: standard (NULL) and error. */
 static struct arpt_target arpt_standard_target = {
        .name           = ARPT_STANDARD_TARGET,
+       .targetsize     = sizeof(int),
 };
 
 static struct arpt_target arpt_error_target = {
        .name           = ARPT_ERROR_TARGET,
        .target         = arpt_error,
+       .targetsize     = ARPT_FUNCTION_MAXNAMELEN,
 };
 
 static struct nf_sockopt_ops arpt_sockopts = {
index c97650a16a5b61607b1c0f7463fb43deb2ba3b79..4715cf5b06c9b6bbb48030e8c6a554d3974980cd 100644 (file)
@@ -80,12 +80,12 @@ checkentry(const char *tablename, const void *e, void *targinfo,
        return 1;
 }
 
-static struct arpt_target arpt_mangle_reg
-= {
-        .name          = "mangle",
-        .target                = target,
-        .checkentry    = checkentry,
-        .me            = THIS_MODULE,
+static struct arpt_target arpt_mangle_reg = {
+       .name           = "mangle",
+       .target         = target,
+       .targetsize     = sizeof(struct arpt_mangle),
+       .checkentry     = checkentry,
+       .me             = THIS_MODULE,
 };
 
 static int __init init(void)