Change ip select algorithm. Update test.