]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/netfilter/arpt_mangle.c
Merge branches 'topic/fix/hda' and 'topic/fix/misc' into for-linus
[linux-2.6-omap-h63xx.git] / net / ipv4 / netfilter / arpt_mangle.c
index 3f4222b0a803bfc96dca4c0c85c306c931037090..b0d5b1d0a7693726cf07bf521c559f0e45c20c5b 100644 (file)
@@ -9,13 +9,10 @@ MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
 MODULE_DESCRIPTION("arptables arp payload mangle target");
 
 static unsigned int
-target(struct sk_buff *skb,
-       const struct net_device *in, const struct net_device *out,
-       unsigned int hooknum, const struct xt_target *target,
-       const void *targinfo)
+target(struct sk_buff *skb, const struct xt_target_param *par)
 {
-       const struct arpt_mangle *mangle = targinfo;
-       struct arphdr *arp;
+       const struct arpt_mangle *mangle = par->targinfo;
+       const struct arphdr *arp;
        unsigned char *arpptr;
        int pln, hln;
 
@@ -57,11 +54,9 @@ target(struct sk_buff *skb,
        return mangle->target;
 }
 
-static bool
-checkentry(const char *tablename, const void *e, const struct xt_target *target,
-          void *targinfo, unsigned int hook_mask)
+static bool checkentry(const struct xt_tgchk_param *par)
 {
-       const struct arpt_mangle *mangle = targinfo;
+       const struct arpt_mangle *mangle = par->targinfo;
 
        if (mangle->flags & ~ARPT_MANGLE_MASK ||
            !(mangle->flags & ARPT_MANGLE_MASK))
@@ -73,8 +68,9 @@ checkentry(const char *tablename, const void *e, const struct xt_target *target,
        return true;
 }
 
-static struct arpt_target arpt_mangle_reg __read_mostly = {
+static struct xt_target arpt_mangle_reg __read_mostly = {
        .name           = "mangle",
+       .family         = NFPROTO_ARP,
        .target         = target,
        .targetsize     = sizeof(struct arpt_mangle),
        .checkentry     = checkentry,
@@ -83,15 +79,12 @@ static struct arpt_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);