Age | Commit message (Collapse) | Author |
|
Also slightly change the structure of shims so that the compat version
uses a different package (com.android.networkstack.apishim.api29),
which is jarjared to the main package name on API stable builds. On API
current builds, the shim falls back to the compat version if
Build.VERSION is older, or uses the main package otherwise.
Jarjar requires using a java_library instead of a filegroup, so the
shims build targets are converted to java_libraries.
This allows the API current build to be usable on older devices, since
it will automatically fall back to the compat APIs. When the new SDK is
finalized, the API current build can then be shipped without code
modification.
The code also looks better in IDEs as there are no package conflicts.
If there are several versions of the same shim depending on the API
level (so different implementations for different methods in
SocketUtilsShimImpl depending on the API level), having the shim extend
the previous version shim allows to add methods with compatibility
behavior without re-implementing the whole class.
Test: m NetworkStack NetworkStackApiStable
Test: flashed, WiFi working
Test: atest NetworkStackTests
Change-Id: I86f28912b80b8396d6b9b2acd2e247651ba80289
|
|
If a user changes the private DNS setting while NetworkMonitor
are in EvaluatingPrivateDnsState, new failure caused by
recongiguration will put into the message queue. State machine
will get multiple CMD_EVALUATE_PRIVATE_DNS events with different
delay timer which may not work as expected.
Test: atest NetworkStackTests:\
com.android.server.connectivity.NetworkMonitorTest
Bug: 139797781
Change-Id: I7f4e5642b9734daddfefc9c5ef25890aa8d3d64b
|
|
|
|
Provide a new callback for NetworkMonitor to notify
ConnectivityService that which probes are completed.
Bug: 113242081
Test: atest NetworkStackTests
Change-Id: I81f22002bc9a59c7c49d471e15e67722613d61a3
|
|
|
|
|
|
To implement the IP address conflict detection, we need another
ReceiveThread to listen ARP packets as well. Ideally, we should
listen both of DHCP packets and ARP packets in the same thread
with DhcpClient state machine handler.
This CL replaces the ReceiveThread with PacketReader to listen
DHCP packets. After refactoring, DHCP packets are read from the
same handler thread instead of a separate receiving thread. Then
we can also leverage the same handler thread to listen the ARP
packets simultaneously via another raw socket.
Bug: 130775067
Test: atest NetworkStackTests NetworkStackIntegrationTests
Change-Id: I23e91a6c2d99cf8053e62f2ae9d78481ece6384d
|
|
Update the start() and createAndRegisterFd() to boolean type, to make
sure we won't return null socket when failing to create socket.
Throwing IllegalStateException if any caller is calling the FdEventsReader#
start/stop from the different thread, to make it immediately obvious.
Bug: None
Test: atest NetworkStackTests
Change-Id: I398b24da34b8fc9da7e8a9d07508c4d731c4a437
|
|
Currently, the RA parsing code keeps track of byte ranges in the
packet using pairs of integers called "non-lifetimes". Replace
this with a PacketSection class that also stores some information
about the range including whether the range should be matched or
not, what ICMP option the section was a part of, and so on.
This makes the code easier to read and will make it easier to
change the behaviour based on the information contained in the
sections.
Bug: 66928272
Test: refactoring covered by existing unit tests
Change-Id: Iab8b04aafce8d8992e835a6448a75b950296bec5
|
|
* changes:
Make the APF tests a bit more realistic.
Add more RA tests to ApfTest.
|
|
doesn't exist."
|
|
Currently the APF tests include empty options, and manually
assemble the packets. Fix this by using helper methods.
Also increase the memory size of the APF interpreter used by the
test. This is because future CLs in this series add enough RAs to
hit the limit. Also add a log line to the interpreter when the
filter hits the maximum size.
Bug: 66928272
Test: test-only change
Change-Id: Ieed58e278b8a9e7d7f1bdac44aadf56d658df50f
|
|
Bug: 66928272
Test: new tests pass
Change-Id: I61212a8012ce2f4f2727d8531d116975352a45e2
|
|
Considering boolean experimental flag is likely to cause misconfiguration,
particularly when NetworkStack module rolls back to previous version. It's
much safer to determine whether or not to enable one specific experimental
feature by comparing flag version with module version.
Test: atest NetworkStackTests
Change-Id: Ie0c9527eb87b75c998584f2b4439cc0e309e8b28
|
|
Bug: 113350007
Test: atest NetworkStackIntegrationTests
Change-Id: I60ba097997193d9150567dca7156750004425602
|
|
Since DeviceConfig is available in aosp, update the definition
reference from DeviceConfig instead of local definition.
Bug: 120013793
Test: atest NetworkStackTests
Change-Id: I3da82bd822ec340b98ad0b683478bd14ae94693c
|
|
|
|
|
|
|
|
am: 6002e86ede
Change-Id: I257d3da9b47571bdbc4efce54ef5500b7c13a2be
|
|
|
|
Add missing test coverage in DataStallStatsUtils
Test: atest NetworkStackTests
Bug: 133389827
Change-Id: I409ad6a99eebc27fdc6c595506928b6a9c80906c
|
|
NetworkStack will need at least two different build targets: one for the
in-progress SDK for testing before release, and one for the latest
released SDK for releasing to production.
The difference in available APIs is abstracted from the core code by
using shims, with one shim for the released SDK that uses fallback code,
and one shim for the in-progress SDK that calls the actual new API.
The shim included in the built code depends on the build target.
AOSP does not yet have prebuilts for API 29, so the build rule still
references system_current for now.
Test: atest NetworkStackTests
Test: flashed, WiFi working
Test: aapt dump xmltree NetworkStack.apk AndroidManifest.xml: no change
Test: m NetworkStackApiStable (on a branch that has the prebuilt SDK)
Change-Id: I9cf8e712b56a8aad8656eb5095ac8a32f4a05037
|
|
Refactor some methods to allow integration testing between
ConnectivityService and NetworkStack. The integration tests override
some NetworkStack methods to mock permission checks or NetworkMonitor
network requests.
Test: atest NetworkStackTests
Change-Id: Ib5b4458f0b4d1423759e1e4016ab961d3ced7b48
|
|
am: 1ef8fd8741
Change-Id: Ib472de0f7a45b81b84eacaea2ce7a979e80dd371
|
|
Bug: 113350007
Test: atest FrameworksNetTests NetworkStackTests
Test: atest NetworkStackIntegrationTests
Test: manual test
Change-Id: I709a504885033a330b946de402a261d341f78117
|
|
am: c80a667b36
Change-Id: I17e6d5ecea63abd0b5727a0685db8a9fc7b43e26
|
|
IPv6 provisioning loss should be ignored when avoidBadWifi is false, not
true.
Bug: 139023420
Test: with avoidBadWifi=false, when connected to a mobile hotspot that
loses connectivity, WiFi does not disconnect anymore
Change-Id: I534df1595a123866df9ba9f6429331e7fb1c5251
|
|
Wi-Fi AP.""
am: e27aa0f91b
Change-Id: I00442bce3f72843865d0f0edd4d34c8050f0b49f
|
|
This reverts commit 98ed332579d20a8304b5cdbba761d49bcad75fd3.
Reason for revert: prepare another CL to fix the possible NPE issue.
Test: atest NetworkStackIntegrationTests
Change-Id: I9237b31625299162dca1c2b3e012858413639081
|
|
am: 98ed332579
Change-Id: I233bb0a636711ea2772f2b4ea140ce3bc7af3197
|
|
Bug: 113350007
Test: atest FrameworksNetTests NetworkStackTests
Test: atest NetworkStackIntegrationTests
Test: manual test
Change-Id: I4b0ecdb63df567f0cbbb13d2b48bbfaaa7aee4d9
|
|
am: 168d1cd3c0
Change-Id: I83b455ae2f33d486beb944b20ebbf06dffddb32d
|
|
This is required to support Linux kernel 4.11+ due to:
commit 7b8f7a402d4cfc3a1361a2766066127f9bccadc4 [v4.11-rc2-661-g7b8f7a402d4c]
Author: Roopa Prabhu <roopa@cumulusnetworks.com>
Date: Sun Mar 19 22:01:28 2017 -0700
neighbour: fix nlmsg_pid in notifications
neigh notifications today carry pid 0 for nlmsg_pid
in all cases. This patch fixes it to carry calling process
pid when available. Applications (eg. quagga) rely on
nlmsg_pid to ignore notifications generated by their own
netlink operations. This patch follows the routing subsystem
which already sets this correctly.
Reported-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Test: builds
Bug: 137234834
Change-Id: I33244d4ab5aff9305600a68a19ea86609b2d4b5a
Signed-off-by: Maciej Żenczykowski <maze@google.com>
|
|
am: b237ae9944
Change-Id: I5ebe6ed8090dfe5700a065ab1f7eb28de53b06e9
|
|
|
|
am: cbe11b13a6
Change-Id: Ic67deebc9af52d7113a90c1ab0d5cc5b1ea2ea14
|
|
am: 692abb71d9
Change-Id: I801e34d6e3cfdd5ed72036cdbed01f9c92074b11
|
|
Bug: 132670008
Test: atest NetworkStackTests:\
com.android.server.connectivity.NetworkMonitorTest
Change-Id: Icaf526f7303dfc3085f7054cf06869c162fa9899
|
|
Bug: 122710829
Test: atest NetworkStackIntegrationTests
Test: atest NetworkStackTests
Change-Id: If605a5688827b376866b68289b76c452e8366d0c
|
|
am: d53f549885
Change-Id: I4a868d673f6263a5ad2d5acb475e99aac80b750c
|
|
am: d22de9f1fb
Change-Id: Ic7168e87ad6f6689018682c842508c5f0a6f93a9
|
|
ExecutionException cannot be casted to UnknownHostException. If
an unresolvable dns server is set, the ExecutionException will be
triggered and cause cast exception.
Bug: 123435238
Test: atest com.android.server.connectivity.NetworkMonitorTest
Test: Manual test with setting an unresolvable hostname in private
dns config
Change-Id: Icdbc33ddd03740043cac2eff7dec209ffb500e2a
|
|
|
|
|
|
This is a follow-up commit for aosp/944772 to
1. Update error message for UNE
2. Refactor identical code
3. Update comments
Bug: 123435238
Test: atest com.android.server.connectivity.NetworkMonitorTest
Change-Id: I11d5013497352cd32ff43fbdd88e39d12835277c
|
|
Bug: 122710829
Bug: 136216415
Test: atest FrameworksNetTests NetworkStackTests
Test: manual test
Change-Id: I384282b7efd0df0c4a6de7bdc1957048303ad88b
|
|
am: 51b4202ea5
Change-Id: I361808bf8556b5e0dab50ec8c7556544d534a253
|
|
|
|
makePacketSocketAddress() takes an int parameter.
Bug: 130787951
Test: build
Test: atest NetworkStackIntegrationTests
Change-Id: Ied5df7955ba3598b6a8050854648fc5f354bd006
|