[NETFILTER]: remove arpt_(un)register_target indirection macros
authorJan Engelhardt <jengelh@computergmbh.de>
Mon, 14 Apr 2008 09:15:44 +0000 (11:15 +0200)
committerPatrick McHardy <kaber@trash.net>
Mon, 14 Apr 2008 09:15:44 +0000 (11:15 +0200)
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
include/linux/netfilter_arp/arp_tables.h
net/ipv4/netfilter/arpt_mangle.c

index 782b83e5bdb998ca40bac9442ac0236d390a3c4c..dd9c97f2d436ad9f6c381c835fe9ec713329b280 100644 (file)
@@ -264,11 +264,6 @@ struct arpt_error
        .target.errorname = "ERROR",                                           \
 }
 
-#define arpt_register_target(tgt)      \
-({     (tgt)->family = NF_ARP;         \
-       xt_register_target(tgt); })
-#define arpt_unregister_target(tgt) xt_unregister_target(tgt)
-
 extern struct xt_table *arpt_register_table(struct net *net,
                                            struct xt_table *table,
                                            const struct arpt_replace *repl);
index f9c102ab891b1a0d8b6008952cbbe3a883cb0a09..a385959d2655c3d8f0bab57e04920cb91b363119 100644 (file)
@@ -75,6 +75,7 @@ checkentry(const char *tablename, const void *e, const struct xt_target *target,
 
 static struct xt_target arpt_mangle_reg __read_mostly = {
        .name           = "mangle",
+       .family         = NF_ARP,
        .target         = target,
        .targetsize     = sizeof(struct arpt_mangle),
        .checkentry     = checkentry,
@@ -83,15 +84,12 @@ static struct xt_target arpt_mangle_reg __read_mostly = {
 
 static int __init arpt_mangle_init(void)
 {
-       if (arpt_register_target(&arpt_mangle_reg))
-               return -EINVAL;
-
-       return 0;
+       return xt_register_target(&arpt_mangle_reg);
 }
 
 static void __exit arpt_mangle_fini(void)
 {
-       arpt_unregister_target(&arpt_mangle_reg);
+       xt_unregister_target(&arpt_mangle_reg);
 }
 
 module_init(arpt_mangle_init);