Commit Graph

358 Commits

Author SHA1 Message Date
Paul Hu
daff547b43 Merge "Fix null IpmemoryService object in AGO project." am: c28ae5a01d
am: 2530911fa9

Change-Id: I8043c405b3c78d8dd1e71ec584d7a2fdaa2fd989
2019-05-24 01:36:20 -07:00
Paul Hu
c28ae5a01d Merge "Fix null IpmemoryService object in AGO project." 2019-05-24 08:09:56 +00:00
Chiachang Wang
4532abd4d2 Merge "Update multiple validation result to ConnectivityService" am: 20ee375003
am: a0e9af113c

Change-Id: I243db4c406cca826e803c8035268bc0c6e6e01e2
2019-05-23 22:57:18 -07:00
Chiachang Wang
20ee375003 Merge "Update multiple validation result to ConnectivityService" 2019-05-24 02:50:54 +00:00
Chiachang Wang
8ea15c9648 Update multiple validation result to ConnectivityService
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
2019-05-23 16:29:30 +08:00
Remi NGUYEN VAN
c7586ad900 Merge "Address comments on dumpsys network_stack version" into qt-dev
am: f00b63f1ca

Change-Id: Ie2b07797229b39f743c68a2f7acd851b8e4c95de
2019-05-22 17:44:07 -07:00
Remi NGUYEN VAN
f00b63f1ca Merge "Address comments on dumpsys network_stack version" into qt-dev 2019-05-22 23:36:12 +00:00
Remi NGUYEN VAN
fea3232c8e Merge "InProcessNetworkStack requires platform-signed APK" into qt-dev
am: 0bb09184ff

Change-Id: Ic60c07b2850aa2050a52adbd55b9d1bc09cc1156
2019-05-22 05:25:48 -07:00
Lorenzo Colitti
433f7c4178 Merge "Properly use versioned interfaces." am: 9572afce76
am: b92fbe0435

Change-Id: Idf49e840263ef32b9ee4fafa6718d4f893ea7c87
2019-05-22 01:20:45 -07:00
Remi NGUYEN VAN
aabe5a0185 Address comments on dumpsys network_stack version
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
2019-05-22 16:53:33 +09:00
Remi NGUYEN VAN
0bb09184ff Merge "InProcessNetworkStack requires platform-signed APK" into qt-dev 2019-05-22 05:25:14 +00:00
Lorenzo Colitti
fe0c38aed5 Properly use versioned interfaces.
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
2019-05-22 03:12:59 +00:00
Remi NGUYEN VAN
82d28e02d4 InProcessNetworkStack requires platform-signed APK
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
2019-05-22 11:02:12 +09:00
Lorenzo Colitti
f451bafa48 Merge "Move the NetworkStack tests to unit/ to add an integration test." am: ee18cdc67b
am: 51dfffac9b

Change-Id: I2a978293aafc264fdbc637110a74e43a090a1faf
2019-05-21 08:17:18 -07:00
Lorenzo Colitti
ee18cdc67b Merge "Move the NetworkStack tests to unit/ to add an integration test." 2019-05-21 14:49:06 +00:00
paulhu
c877311f88 Fix null IpmemoryService object in AGO project.
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
2019-05-21 09:16:44 +00:00
Remi NGUYEN VAN
2b0582e2e6 Merge "Add dumpsys network_stack version" 2019-05-21 08:09:35 +00:00
Remi NGUYEN VAN
67245262ef Merge "Do not mark in-process NetworkStack as persistent" 2019-05-21 08:08:01 +00:00
Remi NGUYEN VAN
ecaef6f7f2 Merge "Add build targets for non-mainline NetworkStack" 2019-05-21 08:07:45 +00:00
Remi NGUYEN VAN
1a50c004bc Merge "Have InProcessNetworkStack override NetworkStack" 2019-05-21 08:07:29 +00:00
Lorenzo Colitti
752a4e3cd4 Move the NetworkStack tests to unit/ to add an integration test.
Test: m
Change-Id: If638183f45956b60d694c859a759dd761c0598b2
2019-05-21 15:23:23 +09:00
Remi NGUYEN VAN
1a4088c61c Add dumpsys network_stack version
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
2019-05-21 12:20:37 +09:00
Remi NGUYEN VAN
38e261c8c7 Do not mark in-process NetworkStack as persistent
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
2019-05-21 12:20:29 +09:00
Remi NGUYEN VAN
fc7fe9358c Add build targets for non-mainline NetworkStack
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
2019-05-21 12:20:21 +09:00
Remi NGUYEN VAN
4bd8a8b39a Have InProcessNetworkStack override NetworkStack
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
2019-05-21 12:20:10 +09:00
Lorenzo Colitti
42ea026ae7 Add a factoryReset method to IIpMemoryStore, and freeze api.
Currently unimplemented. Implementation will be in a future CL.

Test: m
Bug: 128499160
Change-Id: Ia11ecd33f528d01667b1baeb8671b7213a31eef5
Merged-In: Ia11ecd33f528d01667b1baeb8671b7213a31eef5
(cherry picked from commit 10ddc681cf)
2019-05-20 12:54:22 +00:00
Remi NGUYEN VAN
d4b1d7a6f2 Merge "Add dumpsys network_stack version" into qt-dev
am: 8600673c5d

Change-Id: Ie2bfeb69427976144799002505beaca605bd655c
2019-05-20 05:51:54 -07:00
Lorenzo Colitti
10ddc681cf Merge "Add a factoryReset method to IIpMemoryStore, and freeze api." am: 51164c16aa
am: 43089979c3

Change-Id: I19c7ecdaf5658f6464d6b04d3332f7a5ae25a341
2019-05-20 05:36:27 -07:00
Remi NGUYEN VAN
8ef722a970 Add dumpsys network_stack version
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
2019-05-20 16:47:48 +09:00
Lorenzo Colitti
91dd063172 Add a factoryReset method to IIpMemoryStore, and freeze api.
Currently unimplemented. Implementation will be in a future CL.

Test: m
Bug: 128499160
Change-Id: Ia11ecd33f528d01667b1baeb8671b7213a31eef5
2019-05-20 16:43:23 +09:00
Remi NGUYEN VAN
7055e64685 Merge "Do not mark in-process NetworkStack as persistent" into qt-dev
am: 0a51e93a9b

Change-Id: I0734281d0793426f6c9c8f2b1cd1bdd69eefad7c
2019-05-16 22:32:58 -07:00
Remi NGUYEN VAN
0a51e93a9b Merge "Do not mark in-process NetworkStack as persistent" into qt-dev 2019-05-17 02:29:16 +00:00
Remi NGUYEN VAN
a95544d9a8 Do not mark in-process NetworkStack as persistent
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
2019-05-16 18:21:54 +09:00
Aaron Huang
2913482e08 Merge "apf: Remove IPv6 NAT-T keepalive related codes and ApfTest improvement" into qt-dev 2019-05-15 15:27:14 +00:00
Aaron Huang
7afeb17fb2 Merge "Dropping NAT-T keepalive packet from APF" into qt-dev 2019-05-15 15:26:56 +00:00
Chiachang Wang
036871beb8 Merge "Fix a bug where private DNS to v4-only servers don't validate." into qt-dev 2019-05-15 11:56:10 +00:00
Remi NGUYEN VAN
678d4ea608 Merge "Add build targets for non-mainline NetworkStack" into qt-dev
am: bca73ac0c6

Change-Id: I18504341411e0dd2385e0fd25b940e3ad1acb74b
2019-05-15 04:14:58 -07:00
Chiachang Wang
3134eb413f Fix a bug where private DNS to v4-only servers don't validate.
Bug: 132670008
Test: Manual
Test: atest NetworkStackTests
Change-Id: I8ae6fa6f3800f5f6c9ee88ffe3b8ada34b96dee6
Merged-In: I362d43ee6af318694a4038a257e1ebb3f577863c
2019-05-15 10:40:22 +00:00
Chiachang Wang
4b5f3a313c Merge "Fix a bug where private DNS to v4-only servers don't validate." am: b846759154
am: 5f7aee0050

Change-Id: I362d43ee6af318694a4038a257e1ebb3f577863c
2019-05-15 03:27:57 -07:00
Chiachang Wang
b846759154 Merge "Fix a bug where private DNS to v4-only servers don't validate." 2019-05-15 09:52:50 +00:00
Chiachang Wang
0f449289da Fix a bug where private DNS to v4-only servers don't validate.
Bug: 132670008
Test: Manual
Test: atest NetworkStackTests
Change-Id: I8ae6fa6f3800f5f6c9ee88ffe3b8ada34b96dee6
(cherry picked from commit aea0808d3b26dab24005afc39eb7ec4f4f333bae)
2019-05-15 16:18:56 +08:00
Aaron Huang
4a40e911d0 apf: Remove IPv6 NAT-T keepalive related codes and ApfTest improvement
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)
2019-05-15 07:26:54 +00:00
Remi NGUYEN VAN
fc4a83bd4b Add build targets for non-mainline NetworkStack
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
2019-05-15 16:14:51 +09:00
Aaron Huang
ec92b94320 Merge "apf: Remove IPv6 NAT-T keepalive related codes and ApfTest improvement" am: 4d492d89fa
am: 24f14ed21b

Change-Id: If01bc6a71cf26e13edc049d969d23088fa8242e4
2019-05-14 23:52:26 -07:00
Aaron Huang
4d492d89fa Merge "apf: Remove IPv6 NAT-T keepalive related codes and ApfTest improvement" 2019-05-15 06:17:43 +00:00
Richard Uhler
7ac31f4c9f Merge "Use embedded native libs for NetworkStack.apk." into qt-dev
am: 0ef7b0d46e

Change-Id: I831c4519806dd8e7149a6a2ea29208815770fb47
2019-05-14 07:26:01 -07:00
Richard Uhler
87462d79ff Use embedded native libs for NetworkStack.apk.
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)
2019-05-14 15:18:01 +01:00
TreeHugger Robot
0ef7b0d46e Merge "Use embedded native libs for NetworkStack.apk." into qt-dev 2019-05-14 14:04:37 +00:00
Aaron Huang
d287837d98 apf: Remove IPv6 NAT-T keepalive related codes and ApfTest improvement
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
2019-05-14 19:58:16 +08:00
Remi NGUYEN VAN
70c97d9fbe Merge "Have InProcessNetworkStack override NetworkStack" into qt-dev
am: 6fe150832e

Change-Id: Ia7e126424f13d3ddd897c506b473f28fe2b6d709
2019-05-14 03:02:01 -07:00