ethernet: reenable IPv6 provisioning delays

Unfortunately, there is no way to disable carrier on the tap interface
without first configuring the interface with carrier. This means that it
is possible the interface is brought up before carrier is disabled (it
is an unlikely flake but it does happen in automation). Reenabling RS
delay and DAD will make sure that provisioning does not succeed before
carrier is disabled.

Test: atest EthernetManagerTest --iterations 50
Change-Id: Ie2aa7529b48fa9aceff3dd3b432d87a6eb2f0298
diff --git a/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt b/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt
index b21c5b4..1fc7922 100644
--- a/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt
+++ b/tests/cts/net/src/android/net/cts/EthernetManagerTest.kt
@@ -96,11 +96,11 @@
 import kotlin.test.fail
 
 private const val TAG = "EthernetManagerTest"
-private const val TIMEOUT_MS = 1000L
+private const val TIMEOUT_MS = 2000L
 // Timeout used to confirm no callbacks matching given criteria are received. Must be long enough to
 // process all callbacks including ip provisioning when using the updateConfiguration API.
 // Note that increasing this timeout increases the test duration.
-private const val NO_CALLBACK_TIMEOUT_MS = 200L
+private const val NO_CALLBACK_TIMEOUT_MS = 500L
 
 private val DEFAULT_IP_CONFIGURATION = IpConfiguration(IpConfiguration.IpAssignment.DHCP,
         IpConfiguration.ProxySettings.NONE, null, null)
@@ -151,9 +151,11 @@
                 context.getSystemService(TestNetworkManager::class.java)
             }
             tapInterface = runAsShell(MANAGE_TEST_NETWORKS) {
-                // setting RS delay to 0 and disabling DAD speeds up tests.
-                tnm.createTapInterface(hasCarrier, false /* bringUp */,
-                        true /* disableIpv6ProvisioningDelay */)
+                // Configuring a tun/tap interface always enables the carrier. If hasCarrier is
+                // false, it is subsequently disabled. This means that the interface may briefly get
+                // link. With IPv6 provisioning delays (RS delay and DAD) disabled, this can cause
+                // tests that expect no network to come up when hasCarrier is false to become flaky.
+                tnm.createTapInterface(hasCarrier, false /* bringUp */)
             }
             val mtu = tapInterface.mtu
             packetReader = TapPacketReader(handler, tapInterface.fileDescriptor.fileDescriptor, mtu)