A Distributed Approach to Handle Topological Changes in Advanced Switching