Netdev List
 help / color / mirror / Atom feed
* [PATCH net-2.6.25] [BRIDGE] Remove useless code in net/bridge/br_netfilter.c
@ 2008-01-01 10:48 Rami Rosen
  2008-01-02  5:20 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Rami Rosen @ 2008-01-01 10:48 UTC (permalink / raw)
  To: davem; +Cc: netdev

[-- 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);
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-02  6:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-01 10:48 [PATCH net-2.6.25] [BRIDGE] Remove useless code in net/bridge/br_netfilter.c Rami Rosen
2008-01-02  5:20 ` David Miller
2008-01-02  6:16   ` Rami Rosen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox