Commit Graph

6148 Commits

Author SHA1 Message Date
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
Benedict Wong
248e00b41e Merge "Add configurability of LinkProperties, meteredness for Test Networks"
am: a57dada482

Change-Id: I3ad0ccc7fefbd6bd8888cd1f3f396effcdbfdd3b
2019-04-22 11:07:43 -07:00
Benedict Wong
a57dada482 Merge "Add configurability of LinkProperties, meteredness for Test Networks" 2019-04-22 17:41:20 +00:00
Remi NGUYEN VAN
71a25d5827 Add tests for DhcpErrorEvent
The tests are run both in unit and CTS tests.
Test: atest FrameworksNetTests NetworkStackTestCases
Bug: 129200175

Change-Id: I52976bbbaca26fb317836e8461e372c25df02a22
2019-04-23 00:19:06 +08:00
Paul Hu
457b5be451 Merge "Move more network unit tests to common tests"
am: bce9cb271f

Change-Id: Id130368cd87ed262ef8eb926adf7b80fc3d7c2e3
2019-04-22 07:20:08 -07:00
Paul Hu
bce9cb271f Merge "Move more network unit tests to common tests" 2019-04-22 13:59:25 +00:00
Chalard Jean
37a2b46f75 Fix an argument to the legacy broadcast
Test: new test for this
Fixes: 62650382
Change-Id: I918b8271d3c3c058553ca888cb54cd36a6efba66
2019-04-22 22:26:16 +09:00
Luke Huang
fdd11f803c Make DNS cache lifecycle management explicit
1. ConnectivityService calls netd binder to create/destroy network directly.
2. Call dnsresolver binder to create/destroy cache after create/destroy network.
3. Remove unused network create/destroy methods in NetworkManagementService.

Bug: 129453995
Test: atest FrameworksNetTests
Change-Id: I15660d27f735e33d621d4af8972cdf115bf76dfa
2019-04-22 17:43:37 +08:00
Chalard Jean
36af3e6162 Merge changes Id598ae1d,I475bd011
am: 8fe63a3498

Change-Id: Ic02f8d900b6b430dc1a8bbfdc03297ad52157390
2019-04-21 19:29:00 -07:00
Chalard Jean
8fe63a3498 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
08c2d9e81f 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
Chalard Jean
080562b154 Merge "Make LegacyTypeTracker testable"
am: 54cedaca89

Change-Id: I7dd63d9676862d3416ff75b43f2f8bdbce07134a
2019-04-21 17:13:47 -07:00
Benedict Wong
bdf7048571 Add NATT keepalive resources and methods into IpSecService
This change adds a new NATTKeepalive resource type, along with the
associated allocation/deallocation. Additionally, this change allows
ReferenceCountedResource(s) to not be binder-linked, to allow the
ConnectivityService to verify ownership and allocate a NattKeepalive
without double-registering for binder-death notifications.

Bug: 125517194
Test: IpSecService frameworks tests ran
Change-Id: I8293f79940ad57dabb6f2b9de5e334d06b869443
2019-04-19 11:17:21 -07:00
Benedict Wong
6259ad2be9 Add configurability of LinkProperties, meteredness for Test Networks
This commit adds the ability to pass in LinkProperties and meteredness
for additional testing use cases.

Bug: ?
Test: Compiles. Test utility only.
Change-Id: Idf6c3bcae2dea5e61c0418b72b889496919be8ba
2019-04-19 10:46:56 -07:00
Aaron Huang
f7adc47367 Move NattKeepalivePacketData out of the framework
For implementing parcelable interface for NattKeepalivePacketData.
Move this class out of framework.jar and move to services.jar

This class is used in telephony-common.jar and it also loads
service.jar.

Bug: 33530442
Test: - build pass
      - atest NetworkStackTests
      - atest ConnectivityServiceTest

Change-Id: Id2fdec5c4015d2cefd8a93e0cfdcc3c304fc9b64
2019-04-20 00:37:19 +08:00
Chalard Jean
3a3f5f2a08 Make LegacyTypeTracker testable
...and add basic trivial tests for it.

Test: this, and ConnectivityServiceTest
Bug: 62650382
Change-Id: Ie7ca938e6f66f1b15feb6ed93afa0aebb20884ae
2019-04-19 15:33:44 +09:00
Wayne Ma
009dcb2d12 Merge "Backwards-incompatible resolv module API change for making setResolverConfiguration take a parcelable."
am: c9308bb32d

Change-Id: I429437f3f4c6f5159be907c287a9d59bceb537a5
2019-04-17 07:15:43 -07:00
Wayne Ma
c9308bb32d Merge "Backwards-incompatible resolv module API change for making setResolverConfiguration take a parcelable." 2019-04-17 13:58:11 +00:00
waynema
7b76545b94 Backwards-incompatible resolv module API change for making setResolverConfiguration take a parcelable.
Test: built, flashed, booted
      atest FrameworksNetTests

Change-Id: I3b4e8672f5273c3baa9378025bfaef2e6514df64
2019-04-17 13:55:53 +00:00
Chalard Jean
dc058515a0 Merge "Move TrafficStats tags for the network stack constants"
am: 2a9f0c45f4

Change-Id: I13ba9e3077bb4ec28229a09f2d4747a43c281bcc
2019-04-16 23:08:07 -07:00