--- zzzz-none-000/linux-2.6.13.1/net/bridge/br_if.c 2005-09-10 02:42:58.000000000 +0000 +++ ohio-7170-487/linux-2.6.13.1/net/bridge/br_if.c 2008-05-05 17:41:02.000000000 +0000 @@ -79,8 +79,8 @@ { struct net_device *dev = p->dev; - dev->br_port = NULL; p->br = NULL; + p->dev->br_port = NULL; p->dev = NULL; dev_put(dev); @@ -100,6 +100,7 @@ struct net_bridge *br = p->br; struct net_device *dev = p->dev; + dev->br_port = NULL; dev_set_promiscuity(dev, -1); spin_lock_bh(&br->lock); @@ -365,7 +366,8 @@ list_add_rcu(&p->list, &br->port_list); spin_lock_bh(&br->lock); - br_stp_recalculate_bridge_id(br); + if (!br->automatic_mac_disabled) br_stp_recalculate_bridge_id(br); + br_features_recompute(br); if ((br->dev->flags & IFF_UP) && (dev->flags & IFF_UP) && netif_carrier_ok(dev)) br_stp_enable_port(p); @@ -389,7 +391,13 @@ del_nbp(p); spin_lock_bh(&br->lock); - br_stp_recalculate_bridge_id(br); + if (!br->automatic_mac_disabled) br_stp_recalculate_bridge_id(br); + else { + /* AVM: be sure that the bridge id is still in the fdb */ + /* note the the port in the fdb-entry will not be overwritten wi +th 0, if the entry exists */ + br_fdb_insert(br, 0, br->bridge_id.addr); + } br_features_recompute(br); spin_unlock_bh(&br->lock);