Netdev List
 help / color / mirror / Atom feed
From: "Rami Rosen" <ramirose@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-2.6.25] [BRIDGE] Remove useless code in net/bridge/br_netfilter.c
Date: Tue, 1 Jan 2008 12:48:14 +0200	[thread overview]
Message-ID: <eb3ff54b0801010248t65d296ccm481202d50fad7c4f@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 320 bytes --]

Hi,

These following two commands in br_nf_forward_arp() achieve nothing and
should be removed; the d variable is not used later in this method:

	...
	struct net_device **d = (struct net_device **)(skb->cb);
	...
	*d = (struct net_device *)in;
	...

Regards,
Rami Rosen


Signed-off-by: Rami Rosen <ramirose@gmail.com>

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 788 bytes --]

diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 32ac035..288e102 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -664,8 +664,6 @@ static unsigned int br_nf_forward_arp(unsigned int hook, struct sk_buff *skb,
 				      const struct net_device *out,
 				      int (*okfn)(struct sk_buff *))
 {
-	struct net_device **d = (struct net_device **)(skb->cb);
-
 #ifdef CONFIG_SYSCTL
 	if (!brnf_call_arptables)
 		return NF_ACCEPT;
@@ -682,7 +680,6 @@ static unsigned int br_nf_forward_arp(unsigned int hook, struct sk_buff *skb,
 			nf_bridge_push_encap_header(skb);
 		return NF_ACCEPT;
 	}
-	*d = (struct net_device *)in;
 	NF_HOOK(NF_ARP, NF_ARP_FORWARD, skb, (struct net_device *)in,
 		(struct net_device *)out, br_nf_forward_finish);
 

             reply	other threads:[~2008-01-01 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-01 10:48 Rami Rosen [this message]
2008-01-02  5:20 ` [PATCH net-2.6.25] [BRIDGE] Remove useless code in net/bridge/br_netfilter.c David Miller
2008-01-02  6:16   ` Rami Rosen

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=eb3ff54b0801010248t65d296ccm481202d50fad7c4f@mail.gmail.com \
    --to=ramirose@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox