This is required for the code to be identical in AOSP and
mainline-prod.
Bug: 167645754
Test: atest CtsNetTestCases passes on AOSP device
Test: atest CtsNetTestCasesLatestSdk passes on AOSP device
Test: atest CtsNetTestCasesLatestSdk passes on R device
Change-Id: I094906e535d710a46a3fa833b6aa48cb007d6b63
This is required to build in mainline-prod, which does not have
access to in-progress S APIs.
Bug: 167645754
Test: m NetworkStack CtsNetTestCasesLatestSdk CtsHostsideNetworkTests CtsHostsideNetworkTestsApp
Change-Id: If40ebfadbf6d3ee86a58a55711fbc146a8599fdb
Merged-In: If40ebfadbf6d3ee86a58a55711fbc146a8599fdb
The system API are moved to the connectivity module: add dependency on
the stubs from framework-tethering.
This only allows tethering to depend on system API defined by the
connectivity classes, not on any private code, even if they are
eventually bundled in the same APEX.
Bug: 171540887
Test: m
Merged-In: Iebfb3e01c5d2480e84edcfc76cf489520bd60237
Merged-In: Ic2491f04880ff66abc3b2d3aaee6168e18f6d68a
(clean cherry-pick from internal branch)
Change-Id: Iebfb3e01c5d2480e84edcfc76cf489520bd60237
For ipv6 we need 1 entry per client, so 64 seems like plenty,
while for ipv4 we need 1 entry per flow, so even 1024 seems
like it might not be enough, but it's much better than 64.
Nucca says:
# cat proc/sys/net/netfilter/nf_conntrack_buckets
65536
# cat proc/sys/net/netfilter/nf_conntrack_max
262144
per https://www.kernel.org/doc/Documentation/networking/nf_conntrack-sysctl.txt
the default “nf_conntrack_max” is “nf_conntrack_buckets * 4”.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib7d1d8c19bc688c442d842cf5c9f45cdf1241754
The test failed since the API is not available on R device.
Add conditions to ignore it.
Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideVpnTests
on R device
Bug: None
Change-Id: I05a1f63adec72e89382cb095db714bccbdff0058
This causes failures in subsequent tests that expect
only one test network to be up.
Bug: 181033598
Test: this
Change-Id: I74444f4aff7750a5bbd2564e5e22714d73c72d8b
A caller can mostly already do this via forEach(), but having a
specific method is faster (since the code does not need to read
the value) and easier to use.
The semantics of this method (e.g., ignore ENOENT while deleting
a key, but throw on any other error) match those of the native
BpfMap::clear method.
Test: new unit tests
Change-Id: I5cd32efd0f87c823cd2d0a2fa3a95a83093fb6f9
In AOSP master and downstream branches, this likely works via a
transitive dependency. In mainline-prod, this doesn't work. Add
the dependency explicitly, since it makes things build everywhere
and in general it's also good practice to "include what you use".
Bug: 167645754
Test: m CtsNetTestCasesLatestSdk in mainline-prod has fewer errors
Change-Id: Ie575372415a806deee9996aab7f920d2c15bff80
By the new feature introduced in next Android release.
Any PendingIntent needs to be specified about the mutability.
While ConnectivityService would put extra info such as
network or request id before broadcasting the inner intent.
The MUTABLE flag needs to be added accordingly.
Test: this
Fix: 178121691
Change-Id: I87d0efaf51a91556ef9f8e18db38803e4861cfd7
The test failed since the API is not available on R device.
Add conditions to ignore it.
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.ConnectivityManagerTest
Bug: None
Change-Id: I3cbc623a84f7313e1155fe83a44ebef042a04076
The asserted capabilities change callback event took 170ms
in average to fire on cuttlefish, which causes 35% of
flakiness since the event might delay up to 500ms in practice.
Extend to 30s timeout value which is the standard value
of waiting for network callback events in CTS.
This change also ignore the test up to Android R since the API
is not available for R devices or below.
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest#testRequestBackgroundNetwork \
--rerun-until-failure 500
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.ConnectivityManagerTest
on R device
Bug: 179694867
Change-Id: Ic5e11d4a4f326150848bc48038fa01cde39f7661
The flag allows overriding the value of config_tether_upstream_automatic
on released R devices, as issues have been found on devices where an
overlay was used to set it to false.
The flag is only usable on R devices, as S devices can either not set
the setting to false, or fix the underlying issues.
Bug: 173068192
Test: atest TetheringCoverageTests
Change-Id: Id99638916e08e596fab21cedd7bfe39906ce2fe5
This is a re-upload that combines aosp/1550755 and aosp/1579872.
Test: atest NetworkRequestTest#testBypassingVcnForNonInternetRequest
Test: atest CtsNetTestCasesLatestSdk on R device
Bug: 175662146
Change-Id: I2fdc2418339bef30c9f816d63418bba218abf4a1
We already run these tests when platform code affecting these tests
change. Now enabling these too to also run when these tests are being
changed.
Fixes: 154344933
Test: atest --test-mapping packages/modules/Connectivity/tests/cts/hostside
Change-Id: Ie3ea67670ccd028815936d30189146c25ba87e28
The test did not verify that mobile networks were validated before
starting, which could cause them to validate during the test and pick up
the test URLs. Verify that mobile data is validated before the test.
Also shorten test URL expiration, so in case of hard-interrupt of the
test (without calling tearDown) it does not affect other tests for a
long time.
Bug: 178630586
Test: atest CtsNetTestCases
Change-Id: I03f346bcc231f869f50ca9c7e84bfac319bcc871
because it is not appropriate for use in XDP programs
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibd5dac9676bae7aa5f10fbcfd777291f72bec819
and more importantly unconditionally. This requires less effort
on the part of the in-kernel bpf verifier.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibaa94bf096fc81c4d984dfabf515131b1c81ef09
Currently, this is the default so this is a no-op,
But the default is changing to true.
Bug: 180375550
Test: Treehugger
Change-Id: Ib841e474ab2b2ff2b54c160bb06c3bbbeea92675
We've backported the necessary support to all 4.14+ ACK kernels,
but we can't actually enforce that these changes will be picked
up by all devices. Thus we can only make the full featured
implementations optional on [4.14..5.8) kernels, with a tcp-only
version for those 4.14+ devices where the full featured version
fails to load.
Note: there's still a fair bit of implementation work left
in the do_forward4() function itself. This is really just
the skeleton.
Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If78123e00d55a77f2ecd7da1547581797e23f9b2
This will facilitate providing a tcp-only version of the programs
which due to TCP's very long timeouts will not need to use the
Linux 5.8+ bpf_ktime_get_boot_ns() helpers.
Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1e49b6758d3754782ac6f8820e0c15aa20e4c61d
As this is the actual version that is required,
ie. the version that supports bpf_ktime_get_boot_ns() helper.
Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2ea4830597a0bed53950a5d0c483a47208959f35