lkml.org 
[lkml]   [2004]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectBug in interface removal from bridges.
From
Date
Hi,
this is the straight backport from 2.6.5 of the fix.
Can someone with authority review this and forward it to marcelo for
inclusion in the next 2.4.x release?

To verify your system is vulnerable (need bridge support):
$ brctl addbr br0
$ brctl addbr br1
$ brctl addif br0 eth0
$ brctl delif br1 eth0
(note br1 in last line, not br0!)

Here's the fix as taken from 2.6:
(fixed sometime in 2.5.x it seems; it might be worth looking at when
this was fixed - it might contain other fixes, too.)

--- net/bridge/br_if.c.2.4.21 2004-05-20 14:34:50.000000000 +0200
+++ net/bridge/br_if.c 2004-05-20 14:37:22.000000000 +0200
@@ -254,6 +254,10 @@
int br_del_if(struct net_bridge *br, struct net_device *dev)
{
int retval;
+ struct net_bridge_port *p;
+
+ if ((p = dev->br_port) == NULL || p->br != br)
+ return -EINVAL;

br_write_lock_bh(BR_NETPROTO_LOCK);
write_lock(&br->lock);
Greetings,
Erich

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.054 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site