Ensure MTU is set for new interfaces.

Setting the MTU for an interface should not be skipped when the
interface names are different. This occurs when a VPN network creates
a new interface with identical MTU.

Bug: 246398088
Test: atest ConnectivityServiceTest
Test: Manual test: Connect to VPN network and switch networks
Test: Confirm MTU of interface is set correctly with `adb shell ip addr`
Change-Id: I811a01feca2fb2130c57c6c924145314180434c5
This commit is contained in:
Hansen Kurli
2022-12-07 11:21:49 +00:00
parent edbf34a182
commit 0425203152
2 changed files with 10 additions and 10 deletions

View File

@@ -17155,7 +17155,6 @@ public class ConnectivityServiceTest {
mWiFiNetworkAgent.sendLinkProperties(new LinkProperties(lp2));
waitForIdle();
// TODO(b/246398088): the MTU should be set on the new interface.
verify(mMockNetd, never()).interfaceSetMtu(eq(ifaceName2), eq(mtu));
verify(mMockNetd).interfaceSetMtu(eq(ifaceName2), eq(mtu));
}
}