Once a network is determined to have partial connectivity, it
cannot go back to full connectivity without a disconnect. This
is because NetworkMonitor can only communicate either
PARTIAL_CONNECTIVITY or VALID, but not both. Thus, multiple
validation results allow ConnectivityService to know the real
network status.
Bug: 129662877
Bug: 130683832
Test: atest FrameworksNetTests
Test: atest NetworkStackTests
Test: atest --generate-new-metrics 50
NetworkStackTests:com.android.server.connectivity.NetworkMonitorTest
Test: Simulate partial connectvitiy
Change-Id: I406c9368617c03a2dd3ab15fb1f6dbf539d7c714
Track a set of versions instead of just the latest seen version, and
print versions in the standard dumpsys network_stack as well.
Also add version tracking for the netd aidl interface.
Test: Flashed, dumpsys network_stack and dumpsys network_stack version
Bug: 133124190
Change-Id: I9bf21b10b02f605ef7b85aceb808a5437d936f85
Our stable AIDL interfaces need to use versioned build targets,
otherwise getVersion will always return 0, which makes it
impossible to support different components at different versions.
List generated with:
find . -name Android.bp -exec egrep \
-H "(netd|dnsresolver|ipmemorystore|networkstack).aidl.interface(s?)-(java|cpp)" {} \;
Bug: 133124190
Test: m
Change-Id: Id175c99daa77507847673777a8dcce51897ab17b
PlatformCaptivePortalLogin must be used with InProcessNetworkStack
instead of CaptivePortalLogin, since the signature of the APKs must
match.
Bug: 132666298
Test: Flashed walleye_svelte-eng, networking and captive portal working,
including "use as-is".
Change-Id: I243b29f2397b22f0d55af0d8927e75916d644198
WTF will happen in RegularMaintenanceJobService due to
scheduling job and starting maintenance job are in different
processes. In AGO project, scheduling job use inprocess process.
But starting maintenance job use networkstack process. So
IpmemoryService objcet will be null when trying to do the
maintenance job.
Bug: 132763800
Test: Verify on both AGO and non-AGO projects that WFT will not
happen.
Test: atest NetworkStackTests
Change-Id: I29ea1710b45b8aef697b84e17e793ba9b2cab490
This is necessary to allow testing for the network stack version and the
version it is getting from the system server.
Test: flashed, WiFi working
Test: dumpsys network_stack version shows data (although version numbers
being fixed)
Bug: 133124190
(clean cherry-pick from qt-dev)
Change-Id: If5114ee2b02408cf96f86efaec2c420ccc5e330a
Merged-In: I9ea85c29667d4510225637071990732360841db6
The in-process NetworkStack runs in the system process, so it does not
need to be marked persistent.
Doing so causes a spurious com.android.networkstack.inprocess process to
be running, wasting memory.
Bug: 131046856
Test: Flashed sailfish, networking works, no extra process started
Test: Flashed walleye, networking still works
Test: aapt dump xmltree NetworkStack.apk AndroidManifest.xml unchanged
(clean cherry-pick from qt-dev)
Change-Id: I6816bcc8303a8b7a1213c0c61ee8729cc0b60f13
Merged-In: I0eb896c825ffe2581950c0bdd2b31ebd7eae0982
Add PlatformCaptivePortalLogin and PlatformNetworkPermissionConfig build
targets to override CaptivePortalLogin and NetworkPermissionConfig with
platform-key-signed packages easily. The added packages are unused by
default but can simplify setup for OEMs that use InProcessNetworkStack.
Bug: 132635211
Test: Added the new packages to sailfish build, built image: device has
the proper packages signed with the right keys, networking and
captive portal working fine.
(clean cherry-pick from qt-dev)
Change-Id: Id7590c7d10958467e900fd32a70de53398f18721
Merged-In: I09656deb6ba928f56b478adebb60268fa6f484b0
This avoids shipping both APKs on Go devices, as would be previously
done with the default Go configuration that still included NetworkStack.
Test: Flashed, booted walleye with svelte config. Verified that
NetworkStack is not on the device and InProcessNetworkStack is
used. WiFi working.
Bug: 132666298
(clean cherry-pick from qt-dev)
Merged-In: If4a7a003128a555e512c88469653c3fb2ad864d5
Change-Id: I8f8cf41947eb3be51ac0e97a4f0ec27e6d69aa7e
Currently unimplemented. Implementation will be in a future CL.
Test: m
Bug: 128499160
Change-Id: Ia11ecd33f528d01667b1baeb8671b7213a31eef5
Merged-In: Ia11ecd33f528d01667b1baeb8671b7213a31eef5
(cherry picked from commit 10ddc681cf)
This is necessary to allow testing for the network stack version and the
version it is getting from the system server.
Test: flashed, WiFi working
Test: dumpsys network_stack version shows data (although version numbers
being fixed)
Bug: 133124190
Change-Id: I9ea85c29667d4510225637071990732360841db6
The in-process NetworkStack runs in the system process, so it does not
need to be marked persistent.
Doing so causes a spurious com.android.networkstack.inprocess process to
be running, wasting memory.
Bug: 131046856
Test: Flashed sailfish, networking works, no extra process started
Test: Flashed walleye, networking still works
Test: aapt dump xmltree NetworkStack.apk AndroidManifest.xml unchanged
Change-Id: I0eb896c825ffe2581950c0bdd2b31ebd7eae0982
Remove IPv6 related codes since we don't support IPv6 NAT-T keepalive
as the kernel doesn't support IPv6 UDP encapsulation.
Renaming keepaliveAck to keepaliveResponce since NAT-T keeaplive
response is not an ack. Also, add generateV4NattKeepaliveFilters()
if multicast filter is disabled.
Verify incoming packet contains 1 byte payload but it is not 0xff will
pass NAT-T keepalive filter.
Bug: 33530442
Test: atest FrameworksNetTests
atest NetworkStackTests
Change-Id: I6d3eb9e6271a0f51dec4a55d68a69b4280175d86
Merged-In: I6d3eb9e6271a0f51dec4a55d68a69b4280175d86
Merged-In: If01bc6a71cf26e13edc049d969d23088fa8242e4
(cherry picked from commit 4ee521b022)
Add PlatformCaptivePortalLogin and PlatformNetworkPermissionConfig build
targets to override CaptivePortalLogin and NetworkPermissionConfig with
platform-key-signed packages easily. The added packages are unused by
default but can simplify setup for OEMs that use InProcessNetworkStack.
Bug: 132635211
Test: Added the new packages to sailfish build, built image: device has
the proper packages signed with the right keys, networking and
captive portal working fine.
Change-Id: I09656deb6ba928f56b478adebb60268fa6f484b0
So that the /system version of NetworkStack.apk can be re-installed on
/data without causing problems. This is useful for testing and necessary
for supporting rollback to the system version of NetworkStack.apk.
Bug: 131703417
Bug: 132195177
Test: Confirm NetworkStack.apk now includes .so files.
Test: adb install --staged NetworkStack.apk
adb reboot
Device reboots without problems.
Change-Id: I7c9a1702a2c18e0333b5e409f04b7658fe685f97
Merged-In: I7c9a1702a2c18e0333b5e409f04b7658fe685f97
(cherry picked from commit 103dbe38b4)
Remove IPv6 related codes since we don't support IPv6 NAT-T keepalive
as the kernel doesn't support IPv6 UDP encapsulation.
Renaming keepaliveAck to keepaliveResponce since NAT-T keeaplive
response is not an ack. Also, add generateV4NattKeepaliveFilters()
if multicast filter is disabled.
Verify incoming packet contains 1 byte payload but it is not 0xff will
pass NAT-T keepalive filter.
Bug: 33530442
Test: atest FrameworksNetTests
atest NetworkStackTests
Change-Id: Ifb9e088c0c8d71c763ebd9ad122103d0f97ca278