lists.openwall.net   lists  /  announce  john-users  owl-users  popa3d-users  /  xvendor  oss-security  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4 
Open Source and information security mailing list archives
 
This website is powered by Openwall GNU/*/Linux security-enhanced OS
[<prev] [next>] [thread-next>] [month] [year] [list]
Date:	Tue, 1 Jan 2008 12:48:14 +0200
From:	"Rami Rosen" <ramirose@...il.com>
To:	davem@...emloft.net
Subject: [PATCH net-2.6.25] [BRIDGE] Remove useless code in net/bridge/br_netfilter.c

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@...il.com>

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

Hosted by DataForce ISP - Powered by Openwall GNU/*/Linux