Starting with U, only explicit intents will be allowed to
launch non-exported internal components. Set package name
to entitlement recheck intent so that the intent could be
delivered to tethering itself successfully.
Bug: 278482046
Test: atest TetheringTests
manual verify entitlement recheck work in U
Change-Id: Ife30eee13fe39509ccb5786d2a76fbb7baa022a8
DHCP packet listener doesn't close socket any more upon receiving a
zero-length DHCP packet with a fix, instead, just ignore the zero-length
packet and continue reading. Also update the integration test logic to
verify the new behavior, i.e. we can send DHCPDISCOVER from a second device
with different mac address to verify the upstream DHCP server doesn't close
the listening socket, and then we will receive the response from server e.g.
DHCPOFFER packet.
Bug: 269692093
Test: atest TetheringIntegrationTests
Change-Id: I183da43ce5a6511714d293318fe6c60ea55999c0
This change centralized some common test codes to
verifyHotspotClientUpdate() to facilitate the following
commit for softap+lohs
Bug: 233175023
Test: atest TetheringTests
Change-Id: Iee3905084b244b91abdf7c562d77b5054d58ff6a
ConntrackSocketTest#testIpv4ConntrackSocket always fail in cuttlefish
because it gets NullPointerException when accessing tupleOrig in
ConntrackMessage. tupleOrig can be null if it doesn't have source IP.
This situation happens when dumping the following conntrack entry:
vsoc_x86_64:/ # cat /proc/net/nf_conntrack
ipv4 2 unknown 2 570 src=0.0.0.0 dst=224.0.0.22 [UNREPLIED] \
src=224.0.0.22 dst=0.0.0.0 mark=0 secctx=u:object_r:unlabeled:s0 use=2
Bug: 280203901
Test: atest TetheringPrivilegedTests (on cuttlefish)
Change-Id: Iddc8cb390a4369190d535f4694e0e5fa4b6e590f
Address a TODO in TetheringConfiguration to use a dependency object
instead of static mocking on DeviceConfig.
This avoids TetheringConfiguration dependencies on internal
implementation of DeviceConfigUtils, unblocking changes in
DeviceConfigUtils.
Bug: 279108992
Test: atest TetheringTests
Change-Id: I252eaadff85fa47b894e989b4f2527b00c5dca56
DHCP packet listener closes the listening socket and stops reading
packet upon receiving a zero-length DHCP packet, which will break
the following DHCP handshake. Add an integration test to verify the
current behavior. A follow-up fix will verify if DHCP server will
accept the zero-length DHCP packet and continue reading packet on
that socket.
Bug: 269692093
Test: atest TetheringIntegrationTests
Change-Id: I5990e37cdfad4e8e4337b0bb1a74632286884baf
This commit adds two new fields, tx_bytes and rx_bytes, to the
UpstreamEvent message. These fields provide information about the
amount of data transferred during the event, which can be useful for
network performance analysis. The current tx/rx usages are always
zero, but it will be updated in a later change to reflect the actual
usage. No changes were made to the existing fields upstream_type and
duration_millis.
Test: atest TetheringMetricsTest
Change-Id: I9e1043b3fff5aa3f548b8696bac7e5bc4271c77c
Other virtual interface ethernet test cases stop ethernet tethering
by deleting the virtual interface. To disable ethernet tethering for
testPhysicalEthernet, call stopTethering explicitly.
Bug: 271380398
Test: atest EtherentTetheringTest
Change-Id: I19a73f63227bab6a60d57d38b17a20a3f3f6c1d4
Add the AIDL HAL service interface support and abstract the HIDL/AIDL
interface implementations to allow OffloadController to talk to both
interfaces.
Bug: b/205762647
Test: atest com.android.networkstack.tethering
atest ConnectivityCoverageTests
atest ConntrackSocketTest
Change-Id: If7634a298d03668ed70b328f1ad6ca0ac0fe170b
Somewhat surprisingly, HandlerThread#quitSafely is *not* a synchronous
method, so the tearDown() method still needs to wait for the thread to
join.
Test: TH
Change-Id: I0433e2100adf9299a67af5c259a518cf44f4be57
Somewhat surprisingly, HandlerThread#quitSafely is *not* a synchronous
method, so the tearDown() method still needs to wait for the thread to
join.
Test: TH
Change-Id: I4297ba057b3d4e67c7b462b6995da637f2479d42
"Cts" prefix of test name may be confused in some test profiles
which are non-CTS tests. Ex: TetheringCoverageTests.
Bug: 250552545
Bug: 258637850
Test: atest EthernetTetheringTest
Change-Id: Ieacfa58f8ccc8de87fea2481801844acaf3f99d9
In testUpstreamCapabilitiesChanged, verify that
onUpstreamCapabilitiesChanged is called just after which function
triggered onUpstreamCapabilitiesChanged.
Bug: 243516306
Test: atest TetheringTest
Change-Id: Icd871654455033475092b9e7376b604cb0ba00eb
The duplicated upstream change event on the same network is a bug
which needs to be fixed.
Bug: 243516306
Test: atest TetheringTest
Change-Id: I7c70328d937877ec9832a2764cfb331561ee34b6
UpstreamNetworkMonitor#setCurrentUpstream is going to be removed
because UpstreamNetworkMonitor#mTetheringUpstreamNetwork is unused.
Use tethering event callback to check upstream change.
Bug: 243516306
Test: atest TetheringTest
Change-Id: I5773cfc80190b554a3b63b4f827c220b0e663427
This is a preparation for migrating the upstream change notification.
Changes:
1. Modify testUpstreamNetworkChanged
- Add losing upstream test
- Verify the capabilities on the explicit network
2. Modify testUpstreamCapabilitiesChanged
- Verify the capabilities on the explicit network
3. Add testUpstreamCapabilitiesChanged_stopTethering
- Test that TetherModeAliveState#exit sends the null upstream
notification. Above tests only covers the notifications which
are triggered by chooseUpstreamType or EVENT_ON_CAPABILITIES.
Bug: 243516306
Test: atest TetheringTest
Change-Id: I8f5b23f93c27b8c690b2fd275e3f636fbaeb4973
* changes:
Tethering: deprecate CONNECTIVITY_ACTION on U+ device
Test: add tests to testChooseDunUpstreamByAutomaticMode_*
TetheringTest: separate setup func from chooseDunUpstreamTestCommon
TestTetheringEventCallback may use assertEquals(actual, expected)
but assertEquals(expected, actual).
It is confused while test is failed.
For example:
Code:
callback.expectUpstreamChanged(new Network[] {null} /* expected */);
Before:
java.lang.AssertionError: expected:<100> but was:<null>
After:
java.lang.AssertionError: expected:<null> but was:<100>
Bug: 243516306
Test: atest TetheringTest
Change-Id: I6a987e4dd1cccc5e79da7dda55f194291e0c4a60
This test relies on forceGc to free and finalize the TetheringManager
before perform validation checks. In some test suites, if there were
already too many unused objects accumulated in the system before
running the test, it might take more than 5 seconds to free them.
Increase the maximum retry time to 30 seconds to fix the flakiness.
Bug: 263335396
Test: atest TetheringServiceTest#testTetheringManagerLeak
run the flaky test suite on ABTD with CL
Change-Id: I38bee3d43fbeb278993d113ccbe0645aedc5d75d
Respect the upstream interface mtu instead of always setting
mtu 1500.
Using upstream interface mtu is probably not the best solution
for tether offload pmtu but it at least respects the upstream
interface mtu which may be less than 1500.
Test: manual test
1. Connect to carrier Taiwan Star.
2. Enable tethering and check the mtu 1434 in dumpsys.
IPv4 Upstream: proto [inDstMac] iif(iface) src -> nat ->
dst [outDstMac] pmtu age
udp [02:10:45:32:ef:35] 54(54) 192.168.72.125:39034
-> 15(rmnet1) 100.83.189.11:39034
-> 142.251.43.14:443 [00:00:00:00:00:00] 1434 69657ms
IPv4 Downstream: proto [inDstMac] iif(iface) src -> nat
-> dst [outDstMac] pmtu age
udp [00:00:00:00:00:00] 15(rmnet1) 142.251.43.14:443
-> 54(54) 100.83.189.11:39034
-> 192.168.72.125:39034 [9a:8a:4d:ec:a4:7c] 1434 69633ms
Bug: 262860312
Test: atest BpfCoordinatorTest
Change-Id: Ic6dcb95ed76d5306053e4645b6baebc67ff082cf
Prepare to share setup function to more dun network tests.
No operation is changed.
Bug: 257408654
Test: TetheringTest
Change-Id: I29f08d8bc3cf83aa9d03f5d2819a1c67466b7bcc
The legacy upstream selection flow is never called after T. Stop the
related test cases after T also.
Bug: 257408654
Test: atest TetheringTests
Change-Id: I62692bb9a49dde432d31bece41b4cff442a327d1