All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@medozas.de>
To: kaber@trash.net
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 1/6] netfilter: iptables: remove unused function arguments
Date: Wed, 10 Feb 2010 18:39:01 +0100	[thread overview]
Message-ID: <1265823547-10358-2-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1265823547-10358-1-git-send-email-jengelh@medozas.de>

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 net/ipv4/netfilter/iptable_mangle.c  |   10 +++-------
 net/ipv6/netfilter/ip6table_mangle.c |   10 +++-------
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/net/ipv4/netfilter/iptable_mangle.c b/net/ipv4/netfilter/iptable_mangle.c
index 58d7097..78c62c8 100644
--- a/net/ipv4/netfilter/iptable_mangle.c
+++ b/net/ipv4/netfilter/iptable_mangle.c
@@ -36,11 +36,7 @@ static const struct xt_table packet_mangler = {
 };
 
 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;
@@ -60,7 +56,7 @@ ipt_local_hook(unsigned int hook,
 	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) {
@@ -86,7 +82,7 @@ iptable_mangle_hook(unsigned int hook,
 		     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);
 
 	/* PREROUTING/INPUT/FORWARD: */
 	return ipt_do_table(skb, hook, in, out,
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c
index dc803b7..e530038 100644
--- a/net/ipv6/netfilter/ip6table_mangle.c
+++ b/net/ipv6/netfilter/ip6table_mangle.c
@@ -30,12 +30,8 @@ static const struct xt_table packet_mangler = {
 };
 
 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;
@@ -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));
 
-	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 &&
@@ -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)
-		return ip6t_local_out_hook(hook, skb, out, okfn);
+		return ip6t_mangle_out(skb, out);
 
 	/* INPUT/FORWARD */
 	return ip6t_do_table(skb, hook, in, out,
-- 
1.6.6.1


  reply	other threads:[~2010-02-10 17:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10 17:39 Code cleanups Jan Engelhardt
2010-02-10 17:39 ` Jan Engelhardt [this message]
2010-02-10 17:39 ` [PATCH 2/6] netfilter: reduce NF_HOOK by one argument Jan Engelhardt
2010-02-10 17:39 ` [PATCH 3/6] netfilter: get rid of the grossness in netfilter.h Jan Engelhardt
2010-02-10 17:44   ` Patrick McHardy
2010-02-10 21:07     ` Jan Engelhardt
2010-02-11  9:02       ` Patrick McHardy
2010-02-10 17:39 ` [PATCH 4/6] netfilter: xtables: print details on size mismatch Jan Engelhardt
2010-02-10 17:39 ` [PATCH 5/6] netfilter: xtables: constify args in compat copying functions Jan Engelhardt
2010-02-10 17:39 ` [PATCH 6/6] netfilter: xtables: add const qualifiers Jan Engelhardt
2010-02-11  9:00   ` Patrick McHardy
2010-02-11 13:27     ` Jan Engelhardt
2010-02-11 16:06       ` Patrick McHardy
2010-02-11 16:22         ` Jan Engelhardt
2010-02-11 16:27           ` Patrick McHardy
2010-02-11 17:04             ` Jan Engelhardt
2010-02-10 21:10 ` Code cleanups Jan Engelhardt
2010-02-15 15:34   ` Patrick McHardy
2010-02-15 16:07     ` Jan Engelhardt
2010-02-15 16:23       ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2009-11-03 18:04 Xtables cleanup patches Jan Engelhardt
2009-11-03 18:04 ` [PATCH 1/6] netfilter: iptables: remove unused function arguments Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1265823547-10358-2-git-send-email-jengelh@medozas.de \
    --to=jengelh@medozas.de \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.