Age | Commit message (Collapse) | Author |
|
Rename members for a clearer API, and add try/catch blocks to each
NetworkMonitor call to guarantee there will not be any crash.
Add a flag allowing to disable all the metrics collection code.
Bug: 151796056
Test: atest NetworkStackTests (see also test-only change)
Change-Id: I06d6dccc57146b955b15cf36a2109c68a5355494
|
|
If capport API does not send any valid rely, the capportData
could be null in CapportApiProbeResult. Thus, take null
capportData for invalid case.
Bug: 154196512
Bug: 139034276
Bug: 151796056
Test: atest NetworkStackTests
Merged-In: I99cbff2eb1a9ab87a42011038d911fe15e7344a4
Change-Id: I99cbff2eb1a9ab87a42011038d911fe15e7344a4
|
|
The previous IpClientLinkObserver code could in theory call
mCallback.update with a linkState that came from another update; for
example:
1. onInterfaceAddressUpdated
- mLinkProperties.addLinkAddress
2. onInterfaceLinkStateChanged
- setInterfaceLinkState(false)
1. mCallback.update(false) <- should be true ?
2. mCallback.update(false)
In practice this would not happen because the onFoo methods are all
called in order (same binder token from netd), but IpClientLinkObserver
should not need to make such assumptions.
Bug: 151796056
Test: atest NetworkStackIntegrationTests (see also test-only change)
Change-Id: I60f5a319519069070eb5a07643686bf5ec937665
|
|
When turning wifi off, the interface gets torn down and empty
LinkProperties are received before wifi calls stop(). This causes a loss
of provisioning to be logged, instead of normal termination.
Watch interface link status up/down events, and when provisioning is
lost when the interface is down, consider it a normal termination.
Bug: 151796056
Test: manual: turn wifi off, observe events
Test: atest NetworkStackIntegrationTests (see also test-only change)
Original-Change: https://android-review.googlesource.com/1343236
Merged-In: I9d086a199de0017aa425219d20882211423925e0
Change-Id: I9d086a199de0017aa425219d20882211423925e0
|
|
Bug: 151796056
Test: atest NetworkStackIntegrationTests NetworkStackTests
Test: atest FrameworksNetTests
Test: Manual test with statsd_testdrive
Original-Change: https://android-review.googlesource.com/1343438
Merged-In: Ib83ceb70af3491dacbb4a45f65ef38661ae75e32
Change-Id: Ib83ceb70af3491dacbb4a45f65ef38661ae75e32
|
|
|
|
1. Fill in each field of the NetworkIpProvisioningReported
2. Write the NetworkIpProvisioningReported into statsd
Bug: 151796056
Test: atest NetworkStackIntegrationTests NetworkStackTests
Test: atest FrameworksNetTests
Test: Manual test with statsd_testdrive
Original-Change: https://android-review.googlesource.com/1313574
Merged-In: If4bc6af1b794a8620a08858d6cfd85e661865bd7
Change-Id: If4bc6af1b794a8620a08858d6cfd85e661865bd7
|
|
|
|
State machine will transit to RunningState directly after clearing all
left addresses even if the preconnection flag is enabled, that seems
incorrect to skip PreconnectingState. Rely on the preconnection flag
to determine which correct state should transit to.
Bug: 159109671
Test: atest NetworkStackIntegrationTests NetworkStackTests
Merged-In: I3d520a50f26ba7fac804c85c968013b2cb7cab91
Change-Id: I3d520a50f26ba7fac804c85c968013b2cb7cab91
|
|
The classes should not be picked up from frameworks/base, as they are
part of several mainline modules.
Bug: 151052811
Test: m; manual: flashed, wifi and telephony working
Test: atest NetworkStackCoverageTests
Change-Id: I62da3419408b7eb71ea5319e8717fbb22c76a94e
|
|
Remove the dependency on DhcpResults in moduleutils by moving
toStableParcelable to NetworkStack main code, and fromStableParcelable
to the test only.
Only NetworkStack should be generating DhcpResultsParcelables, and only
the NetworkStack should be using DhcpResults at this point (eventually
the class would move from frameworks/base/core to NetworkStack).
Test: built, flashed, WiFi working
Bug: 149403767
Original-Change: https://android-review.googlesource.com/1277444
Merged-In: I093fa48967a48f594b242b1e05e7d481fa9ee529
Change-Id: I093fa48967a48f594b242b1e05e7d481fa9ee529
|
|
|
|
When IPv6 provisioning loss happens due to the default route has
gone, however, if IPv4 network is still provisioned, we can consider
to disable IPv6 stack and still keep the current connection without
disconnecting from wifi, applications will be able to reconnect over
IPv4 network.
Bug: 131781810
Test: atest NetworkStackTests NetworkStackNextTests
Test: atest NetworkStackIntegrationTests
Merged-In: I8f56a05b38c8387c91306c0dc2bdf4430ec3bd00
Change-Id: I8f56a05b38c8387c91306c0dc2bdf4430ec3bd00
|
|
NetworkMonitor suspects stall if we get high tcp fail rate in
10s. In a cell transition frequently environment, a certain
percentage packets lost or retransmission may stay for a longer
time interval. The shorter tcp polling interval may not able to
get confident enough result. The looser timer may also
increase validated result in the metrics which may not a good
signal. Thus, increase the polling interval to address it.
Bug: 157957111
Test: atest NetworkStackTests
Merged-In: I496a32da8f57f88908402722ebe1cd3d0a8483b6
Change-Id: I496a32da8f57f88908402722ebe1cd3d0a8483b6
|
|
|
|
|
|
Currently the timeout in the INIT-REBOOT state is 18s which allows
4 retransmits. In the scenario where DHCP server fails to response
due to certain reason, DhcpClient should go back to INIT state ASAP
and do the regular DHCPDISCOVER. Shorten the timeout to 5s to speed
up the fallback process.
Bug: 157960451
Bug: 157603386
Test: atest NetworkStackIntegrationTests
Test: manual test to verify that client goes back to INIT state
and broadcasts DHCPDISCOVER after 2 retransmissions.
Merged-In: I9d214e193a4f80a9512a3a6f385ca3554f050386
Change-Id: I9d214e193a4f80a9512a3a6f385ca3554f050386
|
|
Allowing the capport API to be hosted on localhost makes it easy to
write fast, stable tests for the feature.
This was not possible because:
- Pre-validation of the URL used Patterns.WEB_URL, which is
over-restrictive and excludes domain names without TLD
- NetworkMonitor needs the API to be hosted via HTTPS which is working
as intended, however relaxing this requirement only for localhost
(for testing) seems reasonable.
Bug: 156062304
Test: atest CaptivePortalApiTest in associated change
Original-Change: https://android-review.googlesource.com/1309235
Merged-In: I5f2cdd02376785b152e5b9a6e798d797894ea45b
Change-Id: I5f2cdd02376785b152e5b9a6e798d797894ea45b
|
|
Bug: 146460486
Test: atest android.net.IpMemoryStoreTest
Test: atest com.android.server.connectivity.ipmemorystore.IpMemoryStoreServiceTest
Change-Id: I493472cb65262b04769192b702178351416c9869
Merged-In: I805733e201aa1286477cfac589cdf4ac18bb7e2b
(cherry-picked from aosp/1311636)
|
|
|
|
|
|
The microsecond time information needs to be recorded in
the NetworkStack Metrics (NetworkIpProvisioningReported).
So the unit of stopwatch is converted from millisecond to microsecond.
Bug: 151926185
Test: atest com.android.server.connectivity.NetworkMonitorTest
Original-Change: https://android-review.googlesource.com/1299376
Merged-In: I5a27a3b1316c67bf076b2e490860385267358ef8
Change-Id: I5a27a3b1316c67bf076b2e490860385267358ef8
|
|
|
|
Bug: 156575243
Test: atest NetworkStackTests NetworkStackIntegrationTests
Test: atest NetworkStackNextIntegrationTests
Test: manual test:
1. connect to AP successfully at the first time
2. disconnect wifi
3. reconnect to the same AP
4. checked client broadcasts REQUEST instead of DISCOVER
5. checked client broadcasts DISCOVER if lease has expired
Merged-In: I62d1ab6b94be1ee95fbaa2ecce62eaba01e7892d
Change-Id: I62d1ab6b94be1ee95fbaa2ecce62eaba01e7892d
|
|
|
|
IpConnectivityLog which is used to send metrics need NETWORK_STACK
permission. Mock IpConnectivityLog to avoid sending metrics from
tests. Also remove platform cert from the network stack unit test
because it is not necessary for any signature permission anymore.
Bug: 156866746
Test: NetworkStackNextTests, NetworkStackCoverageTests, TetheringTests,
TetheringCoverageTests
Change-Id: Ibff052b30e000de3c5a08d7265c7642d67d9b0d0
|
|
Current metrics contains only DNS signal. Given TCP info is
also considered to detection data stall, the related TCP
information should be included into metrics.
Bug: 150182763
Test: atest NetworkStackTests NetworkStackNextTests
Test: Test with ./out/host/linux-x86/bin/statsd_testdrive 121
to ensure log properly
Merged-In: I5e306299f3cf4f49c46f161cd0aa4cb40d1ab76e
Change-Id: I5e306299f3cf4f49c46f161cd0aa4cb40d1ab76e
|
|
MAX_TIMEOUT_MS: 128s -> 512s, battery drain for DHCP packet retransmit.
FIRST_TIMEOUT_MS: 2s -> 1s, shorten DHCP packet retransmit interval.
DEFAULT_TIMEOUT_MS: 36s -> 18s, quickly detect provisioning timeout.
Bug: 131781810
Test: atest NetworkStackIntegrationTests NetworkStackTests
Merged-In: Ie162b0d59da0082cd0c5ec02bb391c3d27f40607
Change-Id: Ie162b0d59da0082cd0c5ec02bb391c3d27f40607
|
|
Bug: 130741856
Test: atest NetworkStackTests NetworkStackNextTests
Merged-In: I9f558ce0838c87d9bb0ef519ee7c91e16f3bb066
Change-Id: I9f558ce0838c87d9bb0ef519ee7c91e16f3bb066
|
|
To support DHCPDECLINE message and request a new prefix from
IpServer, a WaitState is required to wait until IpServer allocates
a different prefix and completes configuring this prefix/route.
Then server could resume from pausing DHCP packets listening.
From this point, StateMachine is easier to add a WaitState for
implementation. Refactor DHCP server by replacing ThreadHandler
with StateMachine first.
Bug: 130741856
Test: atest NetworkStackTests NetworkStackNextTests
Test: manual test: connect wifi, turn on hotspot, downstream
device attaches to hotspot successfully, then turn off
hotspot, repeat multiple times.
Merged-In: I6c09d9c371e9c4e71d8ba26adaed640e3b97437b
Change-Id: I6c09d9c371e9c4e71d8ba26adaed640e3b97437b
|
|
This provides a better separation of the classes based on their role (an
actual shim, or an interface or utility common to all shims), and forces
the apishim package to import the common classes, which makes it easier
at SDK bump time since the imports do not need to be added at that
point.
Bug: 143586229
Test: atest NetworkStackTests
Original-Change: https://android-review.googlesource.com/1310517
Merged-In: Ie77c17a96a67016f35890afa065bea0a07b09504
Change-Id: Ie77c17a96a67016f35890afa065bea0a07b09504
|
|
into rvc-dev
|
|
Bug: 130741856
Test: atest NetworkStackTests TetheringTests
Test: manually turn on the hotspot and verify the downstream device
can attach to the upstream hotspot, then turn it off, repeat
multiple times.
Merged-In: I9da5fec47a74de36869e795fa9b1d7170d2f91c9
Change-Id: I9da5fec47a74de36869e795fa9b1d7170d2f91c9
|
|
Default value for probing url should be a constant in
NetworkStack but not an overlayable config due to some
technical limitations. OEMs can mistakenly override configs
that were not designed to be overridden.
Bug: 152730542
Test: atest NetworkStackTests NetworkStackNextTests
Change-Id: I1846958e7c4e8b64ae287718c63e705bb232632a
Merged-In: I1846958e7c4e8b64ae287718c63e705bb232632a
|
|
Currently the code does not cancel the PREF64 alarm when IpClient
is stopped. If the alarm fires when IpClient has disconnected, it
will call updatePref64 with a null prefix, which will crash.
Ensure that the alarm is cancelled when IpClient is stopped.
Bug: 153694684
Bug: 155559286
Test: new unit tests
Change-Id: I397eb36c1a8ecf1324de33e720577fe2e4e07056
|
|
Previously if handlePacket threw an exception, FdEventsReader would
stop reading and close the file descriptor.
This is not helpful as users of this class may encounter errors
processing a particular packet (typically), but they generally should
not stop completely for that reason.
Also address comments from previous change (Exception instead of
Throwable: Throwable should not be caught in general; event -> events).
Bug: 152842850
Test: atest NetworkStackTests
Original-Change: https://android-review.googlesource.com/1295503
Merged-In: I14abe8163ecdfd5251731915f10ea374bfa38b70
Change-Id: I14abe8163ecdfd5251731915f10ea374bfa38b70
|
|
In particular,
- Fix a possible NPE In IpNeighborMonitor, if a NUD_FAILED is received
for some neighbor before all other neighbors have received
RTM_NEWNEIGH.
- Add try / catch in IpNeighborMonitor, DhcpPacketListener,
ConnectivityPacketTracker in case some unexpected exception is thrown
while processing packets.
- Add Log.wtf logging in FdEventsReader in case any such exception is
missed.
Bug: 152842850
Test: atest NetworkStackTests
Original-Change: https://android-review.googlesource.com/1274609
Merged-In: Ia03fec358e98b3f218220e70fc3265e14ca15f78
Change-Id: Ia03fec358e98b3f218220e70fc3265e14ca15f78
|
|
|
|
|
|
* changes:
Fix IpReachabilityMonitorTest flakes/Q failures
Add tests for IpReachabilityMonitor
|
|
IpReachabilityMonitor was failing on Q because of:
- Usage of HexEncoding.encodeToString(byte[], boolean) that did not
exist in Q
- Flakes/failures caused by missing permissions when calling
IpConnectivityLog
- Flakes caused by mocking FileDescriptor#valid() while it could be
accessed from another thread
Bug: 152723363
Test: atest IpReachabilityMonitorTest --rerun-until-failure 500
Merged-In: I9d38c696bf1b3b63be3b9df3161168ee291e7beb
Change-Id: I9d38c696bf1b3b63be3b9df3161168ee291e7beb
(cherry picked from commit 162c7ee3601b49f55b7a72597067bc93836dbb96)
|
|
The test configuration values override RROs that may have been set by
OEMs, which is necessary to be able to rely on them in CTS tests.
Test: atest NetworkStackTests
Bug: 152280218
Merged-In: I8171fd6360a6e504f3abaea3d7de4fa308bbb35b
Change-Id: I8171fd6360a6e504f3abaea3d7de4fa308bbb35b
|
|
The double transition problem might happen when interface is gone by
accident after starting DhcpClient. The StateMachine doesn’t allow
to call transitionTo() in enter().
Use deferMessage() instead to avoid this crash.
Bug: 145182281
Test: manual
Merged-In: I03c4161a01861b47cf878945f7f5cc77c821cd57
Change-Id: I03c4161a01861b47cf878945f7f5cc77c821cd57
|
|
Address issues found during AIDL review:
- Rename clientAddr to singleClientAddr
- Do not use a ParcelableBundle for notifyNetworkTested or
notifyDataStallSuspected; instead use AIDL parcelables for stronger
backwards compatibility guarantees.
As part of moving notifyNetworkTested to using a parcelable the test
result int is split into two: the actual evaluation result, and the
probesSucceeded int. It used to contain both as a bit mask, which does
not make sense if probesAttempted is in a separate int itself.
Test: atest NetworkMonitorTest ConnectivityServiceTest
ConnectivityServiceIntegrationTest, manual
Bug: 153500847
Merged-In: I4aac6ff7432472f8a9345fb5785c6314ec8946e4
Change-Id: I4aac6ff7432472f8a9345fb5785c6314ec8946e4
|
|
|
|
This prevents the code from issuing a Log.wtf due to calling
transitionTo in ClearingIpAddressesState#enter if the interface
does not exist when IpClient starts provisioning is called.
This prevents IpClientIntegrationTest from crashing on eng builds
due to the Log.wtf being unhandled.
Bug: 155005801
Bug: 152723363
Test: atest NetworkStackNextIntegrationTests:IpClientIntegrationTest#testRestoreInitialInterfaceMtu_NotFoundInterfaceWhenStartingProvisioning
Original-Change: http://aosp/1290575
Merged-In: I4f34343816202c996f9227b72d453ea4a464f4b8
Change-Id: I4f34343816202c996f9227b72d453ea4a464f4b8
|
|
moduleutils is a shared utility to be used by multiple network modules.
Stop depending on a framework private class usage. Then all of its users
can stop depending on the statically linked and jarjared private
framework class.
Bug: 148636687
Test: atest TetheringTests NetworkStackNextTests
Merged-In: I693d0318fa4f1afbc220aa7c43e614ab5714a984
Change-Id: I693d0318fa4f1afbc220aa7c43e614ab5714a984
|
|
|
|
Add comments and slightly increase test coverage.
Bug: 153694684
Test: new test coverage in IpClientIntegrationTest
Change-Id: I160a0801449cbe9e66976eaacdd3a914adc3d341
|
|
into rvc-dev
|