wl1251: fix a memory leak in probe
[safe/jmp/linux-2.6] / net / netfilter / xt_TCPOPTSTRIP.c
index 43d6ac2..9dc9ecf 100644 (file)
@@ -3,7 +3,6 @@
  *
  * Copyright (C) 2007 Sven Schnelle <svens@bitebene.org>
  * Copyright © CC Computer Consultants GmbH, 2007
- * Contact: Jan Engelhardt <jengelh@computergmbh.de>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -75,22 +74,18 @@ tcpoptstrip_mangle_packet(struct sk_buff *skb,
 }
 
 static unsigned int
-tcpoptstrip_tg4(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)
+tcpoptstrip_tg4(struct sk_buff *skb, const struct xt_action_param *par)
 {
-       return tcpoptstrip_mangle_packet(skb, targinfo, ip_hdrlen(skb),
+       return tcpoptstrip_mangle_packet(skb, par->targinfo, ip_hdrlen(skb),
               sizeof(struct iphdr) + sizeof(struct tcphdr));
 }
 
 #if defined(CONFIG_IP6_NF_MANGLE) || defined(CONFIG_IP6_NF_MANGLE_MODULE)
 static unsigned int
-tcpoptstrip_tg6(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)
+tcpoptstrip_tg6(struct sk_buff *skb, const struct xt_action_param *par)
 {
        struct ipv6hdr *ipv6h = ipv6_hdr(skb);
-       unsigned int tcphoff;
+       int tcphoff;
        u_int8_t nexthdr;
 
        nexthdr = ipv6h->nexthdr;
@@ -98,7 +93,7 @@ tcpoptstrip_tg6(struct sk_buff *skb, const struct net_device *in,
        if (tcphoff < 0)
                return NF_DROP;
 
-       return tcpoptstrip_mangle_packet(skb, targinfo, tcphoff,
+       return tcpoptstrip_mangle_packet(skb, par->targinfo, tcphoff,
               sizeof(*ipv6h) + sizeof(struct tcphdr));
 }
 #endif
@@ -106,7 +101,7 @@ tcpoptstrip_tg6(struct sk_buff *skb, const struct net_device *in,
 static struct xt_target tcpoptstrip_tg_reg[] __read_mostly = {
        {
                .name       = "TCPOPTSTRIP",
-               .family     = AF_INET,
+               .family     = NFPROTO_IPV4,
                .table      = "mangle",
                .proto      = IPPROTO_TCP,
                .target     = tcpoptstrip_tg4,
@@ -116,7 +111,7 @@ static struct xt_target tcpoptstrip_tg_reg[] __read_mostly = {
 #if defined(CONFIG_IP6_NF_MANGLE) || defined(CONFIG_IP6_NF_MANGLE_MODULE)
        {
                .name       = "TCPOPTSTRIP",
-               .family     = AF_INET6,
+               .family     = NFPROTO_IPV6,
                .table      = "mangle",
                .proto      = IPPROTO_TCP,
                .target     = tcpoptstrip_tg6,
@@ -140,8 +135,8 @@ static void __exit tcpoptstrip_tg_exit(void)
 
 module_init(tcpoptstrip_tg_init);
 module_exit(tcpoptstrip_tg_exit);
-MODULE_AUTHOR("Sven Schnelle <svens@bitebene.org>, Jan Engelhardt <jengelh@computergmbh.de>");
-MODULE_DESCRIPTION("netfilter \"TCPOPTSTRIP\" target module");
+MODULE_AUTHOR("Sven Schnelle <svens@bitebene.org>, Jan Engelhardt <jengelh@medozas.de>");
+MODULE_DESCRIPTION("Xtables: TCP option stripping");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("ipt_TCPOPTSTRIP");
 MODULE_ALIAS("ip6t_TCPOPTSTRIP");