Commit Graph

6064 Commits

Author SHA1 Message Date
Xin Li
a50f7a2fb3 [automerger skipped] Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master."
am: b4da895ce0 -s ours
am skip reason: subject contains skip directive

Change-Id: Id9cffb46751533cdd19a71577bf4dddea6219ddb
2019-05-09 16:46:13 -07:00
Xin Li
00a98876ad [automerger skipped] DO NOT MERGE - Merge Pie Bonito/Sargo into master.
am: 82e787f227 -s ours
am skip reason: subject contains skip directive

Change-Id: Ib109cf35cae4b70ac762f9f3d4951968cfa91e9e
2019-05-09 15:56:19 -07:00
Xin Li
b4da895ce0 Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master." 2019-05-09 22:05:45 +00:00
Junyu Lai
56001c90c8 Merge "Clean up the keepalive slots when network disconnect"
am: 192f09d63e

Change-Id: I2cedf5752d37f96337ab69d94534cb7745e8efa3
2019-05-09 12:29:16 -07:00
Junyu Lai
192f09d63e Merge "Clean up the keepalive slots when network disconnect" 2019-05-09 18:53:03 +00:00
junyulai
782e216494 Clean up the keepalive slots when network disconnect
In general, keepalive slots are released after result of
stopping has returned. However, for network disconnect case,
the service side cannot communicate with network agent since
the async channel is broken.

Clean up keepalive slots right after stop in this case.

Bug: 132341736
Test: 1. atest com.android.server.ConnectivityServiceTest \
         #testNattSocketKeepalives --generate-new-metrics 100
      2. atest FrameworksNetTests --generate-new-metrics 10

Change-Id: Ia30741f71fa72fc117e071976fd73991fa3c9535
2019-05-09 17:16:17 +00:00
Xin Li
82e787f227 DO NOT MERGE - Merge Pie Bonito/Sargo into master.
Bug: 131756210
Change-Id: I77a701deda4935526ad452564f9bda77af345f46
2019-05-09 09:27:04 -07:00
Xiao Ma
042800ead0 Merge "adopt non-blocking method to obtain the IpMemoryStore service."
am: 14b9e8b6d8

Change-Id: Idd6110141795f86dcf28eafab87683eda4c70b93
2019-05-09 04:43:33 -07:00
Xiao Ma
14b9e8b6d8 Merge "adopt non-blocking method to obtain the IpMemoryStore service." 2019-05-09 11:30:56 +00:00
Etan Cohen
477211720f Merge "[CS] Unregister callback as part of onUnavailable dispatch"
am: e2ba92c411

Change-Id: I14d3c0f6c606020bd1d1e756174a66ee933cb15f
2019-05-08 22:13:00 -07:00
Etan Cohen
e2ba92c411 Merge "[CS] Unregister callback as part of onUnavailable dispatch" 2019-05-09 03:57:29 +00:00
Etan Cohen
6cb6599ddd [CS] Unregister callback as part of onUnavailable dispatch
The onUnavailable semantics promise that it is equivalent to calling
the unregister callback method. But - it doesn't unregister the callback
allowing it to be reused. Fixed.

Additionally, modified the unregisterNetworkCallback method to not fail
on duplicate unregistration (since a callback could now self
unregister). Instead simply print a log.

Bug: 130651445
Test: atest ConnectivityServiceTest
Change-Id: I4c54b003a733eb0b1e4fd8674ed13081b1bef8e3
2019-05-09 02:41:40 +00:00
Xiao Ma
afc8845452 adopt non-blocking method to obtain the IpMemoryStore service.
Test: atest FrameworksNetTests
Change-Id: I7de4f23370bdf9c9df5e74ed074c794080d93d95
2019-05-09 10:39:50 +09:00
Luke Huang
7077ae7361 Merge "Correct buffer size limitation for DnsResolver API"
am: c586bdf976

Change-Id: Ia9febf5f707c182d465e79ed8f4d80a4853c868f
2019-05-01 23:28:06 -07:00
Luke Huang
c586bdf976 Merge "Correct buffer size limitation for DnsResolver API" 2019-05-02 05:59:33 +00:00
Paul Hu
1e6c28a167 Merge "Add CTS API coverage for APIs which are used by NetworkStack"
am: ebf3945e1a

Change-Id: I33b58b69e906e5b90dfc7f0b512c81edd51b1684
2019-05-01 21:12:55 -07:00
Luke Huang
fbd8ecfe17 Correct buffer size limitation for DnsResolver API
Bug: 131055651
Test: atest DnsResolverTest
Change-Id: I29decd480172eacb452ccb0da524ef1bf2ffadcf
2019-05-02 11:48:54 +08:00
Paul Hu
ebf3945e1a Merge "Add CTS API coverage for APIs which are used by NetworkStack" 2019-05-02 01:37:26 +00:00
paulhu
e878a6c64f Add CTS API coverage for APIs which are used by NetworkStack
Change-Id: I4f6c34f3bcfa65e60cf73fc1b7cab2d83c32836a
Bug: 129200003
Bug: 129200292
Bug: 129199996
Bug: 129200261
Bug: 129200513
Bug: 129200316
Bug: 129200589
Bug: 129200181
Bug: 129200669
Bug: 129200504
Bug: 129200478
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
2019-04-30 17:26:24 +08:00
Mark Chien
04bd7b864c Merge "Support adding NATT keepalive packet filter"
am: 7a571f5be4

Change-Id: I9618b519f4bd4d5f1edbcede3a3bd727110c2a7e
2019-04-29 09:17:46 -07:00
Mark Chien
7a571f5be4 Merge "Support adding NATT keepalive packet filter" 2019-04-29 15:59:16 +00:00
Paul Hu
a88e73d3ae Merge "Add Network, NetworkCapabilities, StaticIpConfiguration common test cases"
am: c049c59368

Change-Id: Id469ce450ac84d967ee19ecad44dae6905187a59
2019-04-29 08:50:18 -07:00
Paul Hu
c049c59368 Merge "Add Network, NetworkCapabilities, StaticIpConfiguration common test cases" 2019-04-29 15:38:48 +00:00
Aaron Huang
df1edb385c 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
Mark Chien
0718febadc Merge "Add AIDL parcelable for NattKeepalivePacketData"
am: 781e7d163f

Change-Id: Idd5ff9d4d52064dbfe5df1e4677c41bcccd9c09a
2019-04-29 03:49:03 -07:00
Mark Chien
781e7d163f Merge "Add AIDL parcelable for NattKeepalivePacketData" 2019-04-29 10:26:35 +00:00
paulhu
89d49e7bd4 Add Network, NetworkCapabilities, StaticIpConfiguration common test cases
Bug: 129200415
Bug: 129200142
Bug: 129200418
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
Change-Id: I568d516e1ffc9e32061ca6860224c102bdfd7445
2019-04-29 18:13:00 +08:00
Lorenzo Colitti
f8247f0911 Merge "Make DNS cache lifecycle management explicit"
am: 0ce35a9447

Change-Id: Ie97fe453c89476915f3b362b6486c7d4608da2a9
2019-04-25 17:38:23 -07:00
Lorenzo Colitti
0ce35a9447 Merge "Make DNS cache lifecycle management explicit" 2019-04-26 00:23:22 +00:00
Chiachang Wang
5496b6be68 Merge "Update exception type thrown when NetworkStack is missing"
am: 7f310e20e3

Change-Id: Icbf7db83d73a1912573e71c71f694f2d37d788af
2019-04-24 21:19:45 -07:00
Chiachang Wang
7f310e20e3 Merge "Update exception type thrown when NetworkStack is missing" 2019-04-25 03:48:52 +00:00
Chiachang Wang
8c778c9115 Update exception type thrown when NetworkStack is missing
rethrowFromSystemServer is throwing DeadSystemException which
is different from the original log message. Thus, update the
way to rethrow the same RemoteException.

Bug: 130028724
Test: atest FrameworksNetTest
Test: Kill NetworkStack and check the log message
Change-Id: I60862e276dd4e2d143278b272a9ba54219acce26
2019-04-24 13:59:50 +00:00
Rubin Xu
c5f2f8e08d Merge "Reinstate new VPN uid filtering unit tests"
am: 14ae90a4a6

Change-Id: Ib76c2cf319377141a374b3bdcf5e6606aaf9c06b
2019-04-24 02:53:44 -07:00
Treehugger Robot
14ae90a4a6 Merge "Reinstate new VPN uid filtering unit tests" 2019-04-24 09:37:49 +00:00
Aaron Huang
47c7eec480 Add AIDL parcelable for NattKeepalivePacketData
Bug: 33530442
Test: atest FrameworksNetTests

Change-Id: I9b9a51dc5dc06c90229fb36c34c24258991c4146
2019-04-24 16:19:54 +08:00
Aaron Huang
382b3d2a63 Merge "Move NattKeepalivePacketData out of the framework"
am: d3ee38785b

Change-Id: I3c291d378ed3dc54199708fdc188a908ccb3ee08
2019-04-23 21:17:26 -07:00
Aaron Huang
d3ee38785b Merge "Move NattKeepalivePacketData out of the framework" 2019-04-24 04:00:56 +00:00
Rubin Xu
3dc90033a9 Reinstate new VPN uid filtering unit tests
Mock out PackageManager and returns correct information corresponding
to the test app package itself.

Test: atest --generate-new-metrics 10 com.android.server.ConnectivityServiceTest
Bug: 114231106
Bug: 130397860
Change-Id: Ib921700eda417f411d7a2c77c1140fba9ab50bbb
2019-04-23 18:04:14 +01:00
Paul Hu
1fe65ae26c Merge "Add tests for DhcpErrorEvent"
am: 8aec50df25

Change-Id: I7e6271e9becc974ea38d405914a87859ab700877
2019-04-23 09:12:25 -07:00
Paul Hu
8aec50df25 Merge "Add tests for DhcpErrorEvent" 2019-04-23 11:31:03 +00:00
Lorenzo Colitti
93b816a98a Merge "Freeze the networkstack-aidl-interfaces interface"
am: fe7f6005c7

Change-Id: I32e335756927110e3200f002d32f9e1e8acfd779
2019-04-23 01:45:40 -07:00
Lorenzo Colitti
fe7f6005c7 Merge "Freeze the networkstack-aidl-interfaces interface" 2019-04-23 08:33:41 +00:00
Junyu Lai
a1ed113552 Merge "[KA11] Verify fd ownership and allocate resource for NattKeepalive"
am: 91cc5cc467

Change-Id: I2f5e0e11494866b054668c9224a8732cd8c035f9
2019-04-23 01:08:39 -07:00
Junyu Lai
91cc5cc467 Merge "[KA11] Verify fd ownership and allocate resource for NattKeepalive" 2019-04-23 07:48:08 +00:00
Remi NGUYEN VAN
683df1d39a 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
junyulai
2bb85a0bc0 [KA11] Verify fd ownership and allocate resource for NattKeepalive
Since socket keepalive APIs for UDP encapsulation sockets are
public to generic app. In order to ensure the given fd is valid,
this change verifies the resource id inside the UDP
encapsulation socket by using methods provided by IpSecService.

Bug: 125517194
Fix: 123968920
Test: 1. atest FrameworksNetTests --generate-new-metrics 10
      2. atestcom.android.server.ConnectivityServiceTest \
         #testNattSocketKeepalives --generate-new-metrics 100
Change-Id: I408aacc19b364683854d15a095c34e72389a6e5b
2019-04-23 10:47:19 +08:00
Chalard Jean
40b6f96f8d Merge "Fix an argument to the legacy broadcast"
am: 157c444fcf

Change-Id: I76149167598a862a2cc519fbf0b08df0887b27f0
2019-04-22 18:00:01 -07:00
Chalard Jean
157c444fcf Merge "Fix an argument to the legacy broadcast" 2019-04-23 00:38:10 +00:00
Benedict Wong
866cba5a1b Merge "Add NATT keepalive resources and methods into IpSecService"
am: 8ab1de2439

Change-Id: I97e7451959d619f42d68a5c29cca410bf0740852
2019-04-22 13:31:52 -07:00
Benedict Wong
8ab1de2439 Merge "Add NATT keepalive resources and methods into IpSecService" 2019-04-22 20:03:54 +00:00