shill: Delete existing routes when the device is started.
BUG=chromium-os:27358
TEST=Unit tests, network_WiFiManager, manually add foreign routes and
ensure they are deleted, also test to make sure default route remains
after DHCP renewal
Change-Id: Ic26b70d685491f31699ff4684ed289e76af8a9ca
Reviewed-on: https://gerrit.chromium.org/gerrit/17640
Commit-Ready: Thieu Le <thieule@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
diff --git a/connection_unittest.cc b/connection_unittest.cc
index 16e0f78..08d85b9 100644
--- a/connection_unittest.cc
+++ b/connection_unittest.cc
@@ -198,14 +198,14 @@
connection->ReleaseRouting();
// The destructor will remove the routes and addresses.
- EXPECT_CALL(routing_table_, FlushRoutes(kTestDeviceInterfaceIndex0, true));
+ EXPECT_CALL(routing_table_, FlushRoutes(kTestDeviceInterfaceIndex0));
EXPECT_CALL(*device_info_.get(),
FlushAddresses(kTestDeviceInterfaceIndex0));
}
}
TEST_F(ConnectionTest, Destructor) {
- EXPECT_CALL(routing_table_, FlushRoutes(kTestDeviceInterfaceIndex1, true));
+ EXPECT_CALL(routing_table_, FlushRoutes(kTestDeviceInterfaceIndex1));
EXPECT_CALL(*device_info_, FlushAddresses(kTestDeviceInterfaceIndex1));
{
ConnectionRefPtr connection(new Connection(kTestDeviceInterfaceIndex1,