This adds the checks in 2.6 for invalid ether 
and deleting wrong bridge port to 2.4.27 (from Erich Schubert)

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

diff -Nru a/net/bridge/br_if.c b/net/bridge/br_if.c
--- a/net/bridge/br_if.c        2004-06-21 07:47:10 -07:00
+++ b/net/bridge/br_if.c        2004-06-21 07:47:10 -07:00
@@ -19,6 +19,7 @@
 #include <linux/inetdevice.h>
 #include <linux/rtnetlink.h>
 #include <linux/brlock.h>
+#include <linux/etherdevice.h>
 #include <asm/uaccess.h>
 #include "br_private.h"
 
@@ -44,7 +45,7 @@
        struct net_bridge_port *p;
        struct net_bridge_port **pptr;
 
-       if ((p = dev->br_port) == NULL)
+       if ((p = dev->br_port) == NULL || p->br != br)
                return -EINVAL;
 
        br_stp_disable_port(p);
@@ -231,6 +232,9 @@
 
        if (dev->hard_start_xmit == br_dev_xmit)
                return -ELOOP;
+
+       if (!is_valid_ether_addr(dev->dev_addr))
+               return -EADDRNOTAVAIL;
 
        dev_hold(dev);
        write_lock_bh(&br->lock);
_______________________________________________
Bridge mailing list
[EMAIL PROTECTED]
http://lists.osdl.org/mailman/listinfo/bridge

Reply via email to