Commit Graph

292 Commits

Author SHA1 Message Date
Mark Chien
7d64434c73 Merge "Support adding NATT keepalive packet filter" am: d157594a2a
am: b9e515c331

Change-Id: Idaa7238a5c9acdae9f6cff13095ee9436c7c92c8
2019-04-29 09:34:37 -07:00
Aaron Huang
9eeaa3aa9e Support adding NATT keepalive packet filter
Support adding NATT keepalive packet filter to APF
filter.
Generating APF program will be addressed in another CL.

Bug: 33530442
Test: - atest NetworkStackTests
      - atest FrameworksNetTests

Change-Id: I4961d5da343d8700600269632787c28112f0f9f1
2019-04-29 19:33:45 +08:00
Lorenzo Colitti
228ed521b8 Merge "Revert "Make the network stack a persistent process."" am: d38eaa8820
am: b2a5d85522

Change-Id: I9f1e636014971b0931206289d05fd41bebf9b3bc
2019-04-28 19:01:20 -07:00
Lorenzo Colitti
d38eaa8820 Merge "Revert "Make the network stack a persistent process."" 2019-04-29 01:40:34 +00:00
Lorenzo Colitti
0efbd941f6 Merge changes Ia9865c75,I47d9d53d,Idbe10c36 am: da1df963e6
am: 5418c966ae

Change-Id: If1bf801d383204fe17e8d997e9c930755a61bc6d
2019-04-28 18:21:23 -07:00
Lorenzo Colitti
5574fd5248 Revert "Make the network stack a persistent process."
This reverts commit 796afddd6c.

Reason for revert: breaks updatability because persistent processes are not updatable.

Change-Id: I35ded113b31e742f13ad8523a10af3a83a111374
2019-04-27 15:02:50 +00:00
Lorenzo Colitti
65f6ae271b Fix some checkstyle nits in DhcpPacketTest.
Use the Generated code suppression comment filter instead of the
IndentationCheck suppression comment filter because the latter
complains that '+' should be on a new line.

Bug: 120584519
Bug: 127423755
Test: atest NetworkStackTests
Test: atest FrameworksNetTests
Change-Id: Ia9865c75f940e2fbb3aef374a297339e8ea2fd1b
2019-04-27 16:36:39 +09:00
Lorenzo Colitti
681f33cc6a Additional code for server name in DHCP packets.
- Add the hostname to DhcpResultsParcelable.
- Don't store the server hostname if option overload is in use,
  as this is not valid.
- Add unit tests.

Bug: 120584519
Bug: 127423755
Test: atest NetworkStackTests
Test: atest FrameworksNetTests
Change-Id: I47d9d53d1fb58968322cc8b071a44fbc8f7156e1
2019-04-27 16:36:10 +09:00
yuanyunli
43f1bc9d53 Parse the server host name field of the dhcp package
Some hotspot devices will fill in the server host name field of the DHCP
package, such as iphone. Parsing the server host name of the DHCP
package can help identify ios hotspots.

Bug: 120584519
Test: 127423755
Test: builds, boots, wifi works
Change-Id: Idbe10c36332ce421f1bba93eb87e9e1e12463088
2019-04-26 22:59:52 +09:00
Chiachang Wang
d32d766a04 Merge "Remove Settings constants for NetworkStack" 2019-04-25 04:49:04 +00:00
Chiachang Wang
e6d0ab916a Remove Settings constants for NetworkStack
The definitions reference of these constants are moved from
Settings to DeviceConfig. These definitions are @hide and the
usage in the Settings are removed. Thus, remove the definitions
from API level.

Bug: 123167629
Test: make system-api-stubs-docs-update-current-api \
      test-api-stubs-docs-update-current-api
Test: atest NetworkStackTests
Change-Id: I28c4bf2c0b72e154cea91d11007a9497c7f21570
Merged-In: I7291cfa86cd6e907df35e8fbc97e2e9a77e56cab
Merged-In: Ic48bea07e79490dd3787068bc88c748525752a61
2019-04-25 02:40:51 +00:00
Lorenzo Colitti
c1eedfcd12 Merge "Make the network stack a persistent process." am: d0e7befaaf
am: ef68d77b4b

Change-Id: I55261fc6a5937f38ba038ac567f2f2419e40f9e8
2019-04-24 09:51:09 -07:00
Treehugger Robot
d0e7befaaf Merge "Make the network stack a persistent process." 2019-04-24 16:25:24 +00:00
Chiachang Wang
3429aac7ab Merge "Remove Settings constants for NetworkStack" into qt-dev
am: c84e33b3f1

Change-Id: I7291cfa86cd6e907df35e8fbc97e2e9a77e56cab
2019-04-24 09:15:30 -07:00
Lorenzo Colitti
796afddd6c Make the network stack a persistent process.
The network stack should never be killed, because if it does,
recovering networking requires a reboot. Make the process
persistent to reduce the chances of it being killed by the OOM
killer.

Bug: 131046856
Test: builds, boots
Test: process oom_score_adj is -800
Test: process goes from "Persistent Service" to "Persistent" in dumpsys meminfo
Change-Id: Ic8ebf6356e23489f6cd984d680ff9f1b4cbbe52d
2019-04-24 22:36:55 +09:00
Lorenzo Colitti
b63abe5f0e Merge changes I84461d40,Ib3ab9105 into qt-dev
am: 3fe30fa71b

Change-Id: Ief0b029527ec71a6744ba2b6a72751e8a5b2bf98
2019-04-24 05:24:15 -07:00
TreeHugger Robot
c84e33b3f1 Merge "Remove Settings constants for NetworkStack" into qt-dev 2019-04-24 11:46:25 +00:00
Lorenzo Colitti
21c692d717 Merge "Delete unused timeout constant." am: 1439bbb6d5
am: 15b57501ab

Change-Id: I36baeaef7ecac045150ca92e72293c49829c128f
2019-04-24 03:10:52 -07:00
Lorenzo Colitti
11aaadd6ae Delete unused timeout constant.
Test: m
Bug: 129312219
Change-Id: I5b4c8b42dea515f674ff10d64d0e1d06d849cca1
2019-04-24 17:11:12 +09:00
Xiao Ma
123f7f700e Merge "Add overlay tag for default dns servers." into qt-dev
am: fdc8356a6f

Change-Id: I09fe5c1990cb5b1bfb7bd49a9e8fb874aee6085f
2019-04-23 23:00:19 -07:00
Lorenzo Colitti
d575cbfa34 Allow overlaying the DNS probe timeout.
Test: m
Bug: 129312219
Change-Id: I84461d40e4d2e63ce8c111c047cbc085cb49443e
2019-04-24 05:54:33 +00:00
Lorenzo Colitti
28c966eaa9 Add a timeout for the DNS probe.
Bug: 129312219
Test: atest NetworkStackTests
Test: atest --generate-new-metrics 50 NetworkStackTests:com.android.server.connectivity.NetworkMonitorTest
Change-Id: Ib3ab9105d7ae39f551b51e8d5a04b9ec5e549655
Merged-In: Ib3ab9105d7ae39f551b51e8d5a04b9ec5e549655
(cherry picked from commit c7204f689d)
2019-04-24 05:41:02 +00:00
Xiao Ma
f69bf6338d Add overlay tag for default dns servers.
Bug: 130324939
Test: m && flashall && verified dns servers resource has been changed.
Change-Id: Ic897d066567e7c826a18959e1dcc1260f82b4013
2019-04-24 03:29:17 +00:00
Lorenzo Colitti
c7204f689d Merge "Add a timeout for the DNS probe." am: e721b4b83e
am: 133fe15fc0

Change-Id: I01d3e82828ccba060c35cc34c0f28c0535ed4ac7
2019-04-23 09:57:47 -07:00
Lorenzo Colitti
e721b4b83e Merge "Add a timeout for the DNS probe." 2019-04-23 14:13:14 +00:00
Lorenzo Colitti
e8660ef639 Freeze the networkstack-aidl-interfaces interface
This freezes the interface as of the latest beta build, not the tip of
tree. IIpClient#setL2KeyAndGroupHint is not in the frozen definition in
particular.

Generated with:
m networkstack-aidl-interfaces-freeze-api \
    ipmemorystore-aidl-interfaces-freeze-api

Test: flashed, booted, WiFi and captive portal working
Bug: 128803828
Change-Id: Ideabe73fc93bbefca2d624ee9ca190cf31419424
Merged-In: Ideabe73fc93bbefca2d624ee9ca190cf31419424
(cherry picked from commit 9b89cdaaf4)
2019-04-23 09:41:44 +00:00
TreeHugger Robot
27ad19ee9e Merge "provide a resource overlay to configure customized DNS Server." into qt-dev 2019-04-23 09:05:45 +00:00
Lorenzo Colitti
9b89cdaaf4 Merge "Freeze the networkstack-aidl-interfaces interface" am: 950767f9f9
am: 6c88bf9bd7

Change-Id: I0bc827a6c7995eb7b50b4afeed11317ad8e29666
2019-04-23 01:55:01 -07:00
Remi NGUYEN VAN
1232fe37be Freeze the networkstack-aidl-interfaces interface
This freezes the interface as of the latest beta build, not the tip of
tree. IIpClient#setL2KeyAndGroupHint is not in the frozen definition in
particular.

Generated with:
m networkstack-aidl-interfaces-freeze-api \
    ipmemorystore-aidl-interfaces-freeze-api

Test: flashed, booted, WiFi and captive portal working
Bug: 128803828
Change-Id: Ideabe73fc93bbefca2d624ee9ca190cf31419424
2019-04-23 06:49:58 +00:00
Chiachang Wang
4dd1b47b0b Remove Settings constants for NetworkStack
The definitions reference of these constants are moved from
Settings to DeviceConfig. These definitions are @hide and the
usage in the Settings are removed. Thus, remove the definitions
from API level.

Bug: 123167629
Test: make system-api-stubs-docs-update-current-api \
      test-api-stubs-docs-update-current-api
Test: atest NetworkStackTests
Change-Id: I28c4bf2c0b72e154cea91d11007a9497c7f21570
2019-04-23 09:32:14 +08:00
Lorenzo Colitti
6413419435 Add a timeout for the DNS probe.
Bug: 129312219
Test: atest NetworkStackTests
Test: atest --generate-new-metrics 50 NetworkStackTests:com.android.server.connectivity.NetworkMonitorTest
Change-Id: Ib3ab9105d7ae39f551b51e8d5a04b9ec5e549655
2019-04-22 23:38:58 +09:00
Chiachang Wang
9509eb8716 Merge "Move Setting constants for NetworkStack" into qt-dev 2019-04-22 10:37:10 +00:00
Chalard Jean
1ad99fb064 Merge changes Id598ae1d,I475bd011
* changes:
  Fix a possible crash when the listener is null
  Straighten AIDL interface for the memory store
2019-04-22 02:15:04 +00:00
Chalard Jean
da3421e6e5 Straighten AIDL interface for the memory store
Some names were still wrong somehow, and the wrappers were
missing.

Test: NetworkStack & FrameworkNetTests
Change-Id: I475bd011ad9bc714a07021a9dfd85c4876f8e9ad
Merged-In: I475bd011ad9bc714a07021a9dfd85c4876f8e9ad
2019-04-22 00:40:28 +00:00
Chiachang Wang
98b02db88e Move Setting constants for NetworkStack
From mainline perspective, we should use android flag api
instead of using Settings. Thus, move the definitions into
NetworkStack and apply new flag design.

Bug: 123167629
Test: atest NetworkStackTests
Change-Id: I9602263f0bff5d8e942bd652de69ccfcb3034a2f
Merged-In: I6820300c412f94989a5fce7bd6c6f2a3b983b96e
Merged-In: I4f6d130ffbee14f5087d75a8bc211680a34be682
(cherry picked from commit 01440ea909)
2019-04-19 05:29:51 +00:00
Chiachang Wang
32df8810c6 Merge changes from topic "StatsLog.write_migrate"
* changes:
  Java code for mainline modules to log to statsd.
  Migrate NetworkStack metrics off StatsLog.write
2019-04-19 00:58:24 +00:00
Remi NGUYEN VAN
7035b7949c Change the validation URL for Chinese SIMs
The default HTTPS and fallback validation URLs are not accessible from
China, so users in China never get a validated network on WiFi with the
default AOSP settings. OEMs selling devices targeting China typically
change the check URLs for that reason.

When the device uses a Chinese SIM card, change the default validation
URLs to URLs accessible accessible from China as of now.

Test: inserted China SIM, WiFi off/on, dumpsys network_stack shows new
      URL used
Bug: 111819230
Change-Id: Ib7f41f470ef1a9c7712f2477ebfab44e915cf1b9
Merged-In: Ib7f41f470ef1a9c7712f2477ebfab44e915cf1b9
(cherry picked from commit 990ea84d2d)
2019-04-18 13:30:00 +00:00
Chiachang Wang
e06af927c9 Merge "Move Setting constants for NetworkStack" am: 587ee7240e
am: a158ee1975

Change-Id: I6820300c412f94989a5fce7bd6c6f2a3b983b96e
2019-04-18 01:10:50 -07:00
Chiachang Wang
587ee7240e Merge "Move Setting constants for NetworkStack" 2019-04-18 07:35:19 +00:00
Remi NGUYEN VAN
6f7f3b7f0a Merge "Add overlayable tag for NetworkStackConfig" into qt-dev
am: 5410580108

Change-Id: I98780c1197802f26883d683d63be675c9d72024f
2019-04-17 22:49:07 -07:00
Remi NGUYEN VAN
5410580108 Merge "Add overlayable tag for NetworkStackConfig" into qt-dev 2019-04-18 05:36:34 +00:00
Chiachang Wang
e987ba6ccd Migrate NetworkStack metrics off StatsLog.write
Now that the new metrics API can be used, NetworkStack
metrics need to migrate off the legacy StatsLog.write.

Bug: 130323000
Test: Test with ./out/host/linux-x86/bin/statsd_testdrive 121
      to ensure log properly
Test: Ensure NetworkStackStatsLog will be generated as expected
Test: atest NetworkStackTest

cherry-picking commit e512b26913.

Change-Id: I8c70503cf1d9f1d06f30a1936d2d88857d0cff53
Merged-In: I1bfe856d771bf56fe33790aea22eceae2001921a
2019-04-18 09:28:01 +08:00
Chiachang Wang
8b2a8821a9 Move Setting constants for NetworkStack
From mainline perspective, we should use android flag api
instead of using Settings. Thus, move the definitions into
NetworkStack and apply new flag design.

Bug: 123167629
Test: atest NetworkStackTests
Change-Id: I9602263f0bff5d8e942bd652de69ccfcb3034a2f
2019-04-17 17:00:54 +08:00
Chalard Jean
896245a1e2 Move TrafficStats tags for the network stack constants
As per API council feedback, these constants should live in
a place that is private to the network stack, only with a
range defined in system API.

Bug: 129433383
Test: m
Change-Id: I84a90f84a9af6fef4667ee4d512ebd0413222086
Merged-In: I4882686a86e7c6d42f4b0619b921d02619ed6d4c
Merged-In: I9b648ed6c687d56db61a54570c7880c51c1bae51
2019-04-17 05:45:40 +00:00
Chalard Jean
c728f75abd Merge "Move TrafficStats tags for the network stack constants" into qt-dev
am: e7ef0a61f2

Change-Id: I9b648ed6c687d56db61a54570c7880c51c1bae51
2019-04-16 15:06:03 -07:00
Chalard Jean
6a76b7e2e4 Move TrafficStats tags for the network stack constants
As per API council feedback, these constants should live in
a place that is private to the network stack, only with a
range defined in system API.

Bug: 129433383
Test: m
Change-Id: I84a90f84a9af6fef4667ee4d512ebd0413222086
(cherry picked from commit 79a6330650ca04bd7a08afbd63f8016a3b30bc72)
2019-04-16 00:41:54 +09:00
Remi NGUYEN VAN
990ea84d2d Merge "Change the validation URL for Chinese SIMs" am: 08d4a537ec
am: bea65fa482

Change-Id: I79f0c73f1a5c3edf64c347611555e00c3a9a6516
2019-04-12 05:54:46 -07:00
Remi NGUYEN VAN
d361ff3cb9 Freeze netd AIDL interface (framework)
This freezes the interface as of the latest beta build, although it has
not changed since then.
This change adds the necessary implementations for getInterfaceVersion.

Test: flashed, WiFi working
Bug: 128803828
Merged-In: Ib852b0555f0e20b858f9dd0b16dbd98dbbd22b55
Merged-In: I0c231bdce89474b53603cc15d55787c8c78a809d
(cherry picked from commit fd4eafe8f6)

Change-Id: Idc0e7ea98dbf57e07ee578bc1772c2111af2e563
2019-04-12 03:34:02 +00:00
Chiachang Wang
f5d37ae877 Merge "Address nit in NetworkStackUtils" into qt-dev 2019-04-12 03:15:00 +00:00
Xiao Ma
3741fdc5b9 provide a resource overlay to configure customized DNS Server.
Bug: 122621524
Test:  atest FrameworksNetTests NetworkStackTests
Merged-In: I123b3d4516cc6ba6d17629eb74daf448ba7121eb
Merged-In: Iba867a3b7bda1f5db9dfa1b7521d4a4badbf88e0
(cherry picked from commit ac7eb77b90)

Change-Id: Iab8b57ae1bc81c12ce07f849c7820977a9061d55
2019-04-12 02:32:08 +00:00