Topological conditions for in-network stabilization of dynamical systems