]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bridge/br_stp_if.c
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / net / bridge / br_stp_if.c
index 23dea1422c9a90873c13145ae52f7287afcb9633..58d13f2bd121471eb5ee8adf90e5b4ec2dcd1530 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/smp_lock.h>
 #include <linux/etherdevice.h>
+#include <linux/rtnetlink.h>
 
 #include "br_private.h"
 #include "br_private_stp.h"
@@ -27,7 +28,7 @@
  */
 static inline port_id br_make_port_id(__u8 priority, __u16 port_no)
 {
-       return ((u16)priority << BR_PORT_BITS) 
+       return ((u16)priority << BR_PORT_BITS)
                | (port_no & ((1<<BR_PORT_BITS)-1));
 }
 
@@ -49,7 +50,7 @@ void br_stp_enable_bridge(struct net_bridge *br)
        spin_lock_bh(&br->lock);
        mod_timer(&br->hello_timer, jiffies + br->hello_time);
        mod_timer(&br->gc_timer, jiffies + HZ/10);
-       
+
        br_config_bpdu_generation(br);
 
        list_for_each_entry(p, &br->port_list, list) {
@@ -86,6 +87,7 @@ void br_stp_disable_bridge(struct net_bridge *br)
 void br_stp_enable_port(struct net_bridge_port *p)
 {
        br_init_port(p);
+       br_ifinfo_notify(RTM_NEWLINK, p);
        br_port_state_selection(p->br);
 }
 
@@ -99,6 +101,8 @@ void br_stp_disable_port(struct net_bridge_port *p)
        printk(KERN_INFO "%s: port %i(%s) entering %s state\n",
               br->dev->name, p->port_no, p->dev->name, "disabled");
 
+       br_ifinfo_notify(RTM_DELLINK, p);
+
        wasroot = br_is_root_bridge(br);
        br_become_designated_port(p);
        p->state = BR_STATE_DISABLED;
@@ -109,6 +113,8 @@ void br_stp_disable_port(struct net_bridge_port *p)
        del_timer(&p->forward_delay_timer);
        del_timer(&p->hold_timer);
 
+       br_fdb_delete_by_port(br, p, 0);
+
        br_configuration_update(br);
 
        br_port_state_selection(br);