netfilter: iptables: remove unused function arguments
authorJan Engelhardt <jengelh@medozas.de>
Sat, 31 Oct 2009 23:36:40 +0000 (00:36 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Mon, 15 Feb 2010 15:56:51 +0000 (16:56 +0100)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
net/ipv4/netfilter/iptable_mangle.c
net/ipv6/netfilter/ip6table_mangle.c

index c833330..b9b8346 100644 (file)
@@ -36,11 +36,7 @@ static const struct xt_table packet_mangler = {
 };
 
 static unsigned int
 };
 
 static unsigned int
-ipt_local_hook(unsigned int hook,
-                  struct sk_buff *skb,
-                  const struct net_device *in,
-                  const struct net_device *out,
-                  int (*okfn)(struct sk_buff *))
+ipt_mangle_out(struct sk_buff *skb, const struct net_device *out)
 {
        unsigned int ret;
        const struct iphdr *iph;
 {
        unsigned int ret;
        const struct iphdr *iph;
@@ -60,7 +56,7 @@ ipt_local_hook(unsigned int hook,
        daddr = iph->daddr;
        tos = iph->tos;
 
        daddr = iph->daddr;
        tos = iph->tos;
 
-       ret = ipt_do_table(skb, hook, in, out,
+       ret = ipt_do_table(skb, NF_INET_LOCAL_OUT, NULL, out,
                           dev_net(out)->ipv4.iptable_mangle);
        /* Reroute for ANY change. */
        if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE) {
                           dev_net(out)->ipv4.iptable_mangle);
        /* Reroute for ANY change. */
        if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE) {
@@ -86,7 +82,7 @@ iptable_mangle_hook(unsigned int hook,
                     int (*okfn)(struct sk_buff *))
 {
        if (hook == NF_INET_LOCAL_OUT)
                     int (*okfn)(struct sk_buff *))
 {
        if (hook == NF_INET_LOCAL_OUT)
-               return ipt_local_hook(hook, skb, in, out, okfn);
+               return ipt_mangle_out(skb, out);
        if (hook == NF_INET_POST_ROUTING)
                return ipt_do_table(skb, hook, in, out,
                                    dev_net(out)->ipv4.iptable_mangle);
        if (hook == NF_INET_POST_ROUTING)
                return ipt_do_table(skb, hook, in, out,
                                    dev_net(out)->ipv4.iptable_mangle);
index b6216de..7844e55 100644 (file)
@@ -30,12 +30,8 @@ static const struct xt_table packet_mangler = {
 };
 
 static unsigned int
 };
 
 static unsigned int
-ip6t_local_out_hook(unsigned int hook,
-                  struct sk_buff *skb,
-                  const struct net_device *out,
-                  int (*okfn)(struct sk_buff *))
+ip6t_mangle_out(struct sk_buff *skb, const struct net_device *out)
 {
 {
-
        unsigned int ret;
        struct in6_addr saddr, daddr;
        u_int8_t hop_limit;
        unsigned int ret;
        struct in6_addr saddr, daddr;
        u_int8_t hop_limit;
@@ -60,7 +56,7 @@ ip6t_local_out_hook(unsigned int hook,
        /* flowlabel and prio (includes version, which shouldn't change either */
        flowlabel = *((u_int32_t *)ipv6_hdr(skb));
 
        /* flowlabel and prio (includes version, which shouldn't change either */
        flowlabel = *((u_int32_t *)ipv6_hdr(skb));
 
-       ret = ip6t_do_table(skb, hook, NULL, out,
+       ret = ip6t_do_table(skb, NF_INET_LOCAL_OUT, NULL, out,
                            dev_net(out)->ipv6.ip6table_mangle);
 
        if (ret != NF_DROP && ret != NF_STOLEN &&
                            dev_net(out)->ipv6.ip6table_mangle);
 
        if (ret != NF_DROP && ret != NF_STOLEN &&
@@ -80,7 +76,7 @@ ip6table_mangle_hook(unsigned int hook, struct sk_buff *skb,
                     int (*okfn)(struct sk_buff *))
 {
        if (hook == NF_INET_LOCAL_OUT)
                     int (*okfn)(struct sk_buff *))
 {
        if (hook == NF_INET_LOCAL_OUT)
-               return ip6t_local_out_hook(hook, skb, out, okfn);
+               return ip6t_mangle_out(skb, out);
        if (hook == NF_INET_POST_ROUTING)
                return ip6t_do_table(skb, hook, in, out,
                                     dev_net(out)->ipv6.ip6table_mangle);
        if (hook == NF_INET_POST_ROUTING)
                return ip6t_do_table(skb, hook, in, out,
                                     dev_net(out)->ipv6.ip6table_mangle);