Commit Graph

4361 Commits

Author SHA1 Message Date
Erik Kline
1fbfffe431 Merge "Add basic resolution of Private DNS hostname" am: 90310d279e
am: 1015443681

Change-Id: Ifc776c67025925fbeb2c13038ae78061c32567f5
2018-01-18 04:02:46 +00:00
Erik Kline
1015443681 Merge "Add basic resolution of Private DNS hostname"
am: 90310d279e

Change-Id: I9ce3476d80b05c140a02aaf1c21d4da2a68a8909
2018-01-18 03:54:50 +00:00
Lorenzo Colitti
84c003df97 Merge "Add public API methods for private DNS." am: 05b54efcb3
am: d5b2824f06

Change-Id: I8d5a5b72c128231cca1dfb00bc00e887b5fbfc53
2018-01-18 03:27:51 +00:00
Lorenzo Colitti
d5b2824f06 Merge "Add public API methods for private DNS."
am: 05b54efcb3

Change-Id: If2bdfb05fcb235888bf272e4cfddb14619fc3f78
2018-01-18 03:21:02 +00:00
Treehugger Robot
90310d279e Merge "Add basic resolution of Private DNS hostname" 2018-01-18 02:44:53 +00:00
Lorenzo Colitti
05b54efcb3 Merge "Add public API methods for private DNS." 2018-01-18 01:17:17 +00:00
dalyk
83b5fa28ec Add public API methods for private DNS.
Test: Small modifications to LinkProperties test.
Bug: 71828272
Change-Id: Id2f5acb5469132ec4a917837739f42085c71498e
2018-01-17 15:46:21 -05:00
nharold
9e5c53789f Merge "IpSec - API Tweak for removeTransportModeTransform" am: dc88d02119
am: 71aa19dcbf

Change-Id: Id9e9ab09669a53f53f03e5a6e0e4757434c3f3f3
2018-01-17 20:39:29 +00:00
nharold
71aa19dcbf Merge "IpSec - API Tweak for removeTransportModeTransform"
am: dc88d02119

Change-Id: I0ed7128014bbca8973f84d719449dcf70da45fa2
2018-01-17 20:31:15 +00:00
nharold
dc88d02119 Merge "IpSec - API Tweak for removeTransportModeTransform" 2018-01-17 19:07:10 +00:00
Erik Kline
c06d4f9be4 Add basic resolution of Private DNS hostname
Test: as follows
    - built
    - flashed
    - booted
Bug: 34953048
Bug: 64133961
Change-Id: I0a2289ea51a9294352c91d2ead23730d9b0333a5
2018-01-17 23:17:08 +09:00
nharold
553288c304 Merge changes from topic "ipsec-oneway-transform" am: 6987ca3620
am: 6e22cf92e6

Change-Id: I58fe595ff14e3ee6be5191171367e8a2f7fad6da
2018-01-17 09:53:37 +00:00
Nathan Harold
8534382fa6 Make Transforms Unidirectional am: a47ac2bb32
am: 9bbf7ac609

Change-Id: Ie3ca37e14d977fd255a7791ae3332ddda29ab37e
2018-01-17 09:50:37 +00:00
nharold
6e22cf92e6 Merge changes from topic "ipsec-oneway-transform"
am: 6987ca3620

Change-Id: If98285e2bd41e2eedaf81f1ff0e5f2b2d3827f91
2018-01-17 09:42:03 +00:00
Nathan Harold
9bbf7ac609 Make Transforms Unidirectional
am: a47ac2bb32

Change-Id: I7e80c75b3b227fdd16479120d8b7203cc5f28d1c
2018-01-17 09:37:57 +00:00
Nathan Harold
2c97b2e3af IpSec - API Tweak for removeTransportModeTransform
Because IpSecTransforms are now unidirectional,
and because the only mechanism for removing Transforms
removes it from both directions, the API can no longer
use the Transform parameter to meaningfully validate
that the caller had applied a transform. Since that
functionality was as-yet unimplemented and is now
infeasible, the transform parameter is removed.

Bug: 72079356
Test: cts - IpSecManagerTest; runtest frameworks-net
Change-Id: If19b0d34bdc6daf31a40d6d62bff326dcbca08c0
2018-01-17 01:11:46 -08:00
nharold
6987ca3620 Merge changes from topic "ipsec-oneway-transform"
* changes:
  Update IpSecService UnitTests
  Make Transforms Unidirectional
2018-01-17 08:40:37 +00:00
Nathan Harold
e0d099dfb3 Update IpSecService UnitTests
The IpSecService Unit tests relied on the
directionality of the IpSecConfig and previously
did not specify a source address. Unit tests
updated without functional change other than to
address these two requirements.

Bug: 71717213
Test: runtest frameworks-net
Change-Id: Iedbed735bc50fd4fdfe985f9e173956062a7b0d1
2018-01-16 19:38:10 -08:00
Nathan Harold
a47ac2bb32 Make Transforms Unidirectional
Convert the IpSecTransform from being a bi-directional
pair of SAs to a unidirectional single SA. This CL
also removes the concept of "direction from SAs meaning
that a IpSecTransform may now be applied to a socket
in either direction.

-Make transforms unidirectional
-Add Convert allocateSpi() to use destination rather
 than direction and remote address
-Remove directionality from builders for IpSecTransform
-Change applyTransportModeTransform() to take a
 direction in which to apply the transform object.
-Additional minor naming updates
-Restrict IpSecConfig to only print keys on eng builds
-Move DIRECTION constants to IpSecManager
-Add sourceAddress parameter to IpSecTransform to provide
 additional guarantees about the source address of data;
 (explicit failure rather than implicit failure).
-Move SPI to the build() method of IpSecTransform

Bug: 71717213
Test: runtest frameworks-net, CTS - IpSecManagerTest
Change-Id: I0824b37f443f4b8c62536d9801238c63ed8f2a1c
2018-01-16 11:08:31 -08:00
Lorenzo Colitti
aa9180b43f Merge changes I0d0c0fac,Ifb9b00b6 am: b29d74c625
am: bfaf963337

Change-Id: Ie943428132fbcfcc565d54b46830ed297227ef35
2018-01-16 18:41:46 +00:00
Treehugger Robot
b29d74c625 Merge changes I0d0c0fac,Ifb9b00b6
* changes:
  Split updateCapabilities into two methods.
  More strictly check NetworkCapabilities callbacks.
2018-01-16 14:25:13 +00:00
Lorenzo Colitti
dd7216316d Merge "Update netId to nethandle mapping in NetworkTest." am: 42293ba74d
am: 503135596b

Change-Id: I5e8e57f38580742eae38f63f43e37cc647412212
2018-01-16 13:34:46 +00:00
Lorenzo Colitti
726641197d Split updateCapabilities into two methods.
This makes the code a bit easier to follow.

Test: ConnectivityServiceTest continues to pass
Change-Id: I0d0c0facc1e3ba07b53542b35da40ddc096ff92e
2018-01-16 21:25:10 +09:00
Treehugger Robot
42293ba74d Merge "Update netId to nethandle mapping in NetworkTest." 2018-01-16 12:23:02 +00:00
Hugo Benichi
b2cf723e43 Merge "MacAddress: add @NonNull annotations" am: 7d767a4710
am: a7c125e5b2

Change-Id: Icaa08c082797c6dbc3382e0662e24e1c84114175
2018-01-16 10:30:20 +00:00
Lorenzo Colitti
9499a55b90 Update netId to nethandle mapping in NetworkTest.
Bug: 63052780
Test: NetworkTest now passes
Change-Id: I5f1cb3055b7042a19afb5dd62f082912157612ba
2018-01-16 17:19:04 +09:00
Hugo Benichi
7d767a4710 Merge "MacAddress: add @NonNull annotations" 2018-01-16 07:10:50 +00:00
Lorenzo Colitti
a5b81cd2ad Merge "Change the netId to nethandle mapping." am: 333dc71728
am: feaf412e19

Change-Id: Idd1b2f462c1c78bdb68b43a4aa77bf2358f7cb52
2018-01-16 05:16:34 +00:00
Hugo Benichi
5e5c4b40f9 MacAddress: add @NonNull annotations
This patch adds to the MacAddress class:
  - getAddressType() method which replaces addressType(), for naming
  consistency
  - @NonNull annotations on all input and output reference values for
  all public methods (@hide and public).

TYPE_UNKNOWN, which currently cannot be observed with a non @hide
method, is also removed from the public api.

Bug: 71866627
Test: $ runtest frameworks-net
Change-Id: I2af70408d46f431b7b32183e6b48ddae9a261a2c
2018-01-16 13:32:59 +09:00
Treehugger Robot
333dc71728 Merge "Change the netId to nethandle mapping." 2018-01-16 02:58:56 +00:00
Hugo Benichi
6d19220966 Merge "ConnectivityService: synchronize access on mLockdownEnabled" am: 2a0316897e
am: 2d59e3cab0

Change-Id: Icadee616fc95e1c126285524dfe49331fcf87462
2018-01-16 02:31:48 +00:00
Hugo Benichi
2a0316897e Merge "ConnectivityService: synchronize access on mLockdownEnabled" 2018-01-16 00:20:52 +00:00
Lorenzo Colitti
3d1632d6c9 Change the netId to nethandle mapping.
Being able to update this handle is necessary to ensure that
system-only OTAs do not break vendor code that relies on
nethandles.

Bug: 63052780
Test: walleye builds, boots, networking works
Test: MultinetworkApiTest CTS tests passes
Change-Id: I049a4ad2610ca68b8f56377b63be7e5e8ce76039
2018-01-16 02:08:09 +09:00
Lorenzo Colitti
23f3676c79 More strictly check NetworkCapabilities callbacks.
This change more strictly accounts for onCapabilitiesChanged
callbaks and their values. It exposes several cases where we the
callbacks we send are spurious.

Test: ConnectivityServiceTest continues to pass
Change-Id: Ifb9b00b6f0cae48f8ed41a525100d1744b5f429b
2018-01-16 00:25:13 +09:00
Erik Kline
88cdfd6879 Merge "change NMS removeNetwork to netd binder variant" am: e61ee4198e
am: b73571b981

Change-Id: I6de7f38c7081e14d817cc7aad44cb5b6a978328b
2018-01-15 14:38:08 +00:00
Erik Kline
31645bd68e change NMS removeNetwork to netd binder variant
Also: require NETWORK_STACK instead of CONNECTIVITY_INTERNAL.

Bug: 34953048
Bug: 64133961
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net
Change-Id: I26f07f51a8a2f4a8bb43a276da7c5e66c355c848
2018-01-15 19:51:37 +09:00
Erik Kline
c4bfb71ab9 Merge changes I47ccfa99,I5db1de3e am: 3e2ccb4ff1
am: 03f3294103

Change-Id: I311f6c299daf1c8d21731187d8e78e55c5767564
2018-01-11 12:43:38 +00:00
Treehugger Robot
3e2ccb4ff1 Merge changes I47ccfa99,I5db1de3e
* changes:
  Extract DNS setting logic into DnsManager class
  Add minimal test for setting DNS properties
2018-01-11 11:33:30 +00:00
Erik Kline
cca88b079c Extract DNS setting logic into DnsManager class
In future, managing DNS-over-TLS hostname lookup and netd programming
can be encapsulated here.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 64133961
Change-Id: I47ccfa99c30c780524c45c4af605e720ccba34a0
2018-01-11 18:16:50 +09:00
Erik Kline
3fce4e528d Add minimal test for setting DNS properties
Test: as follows
Change-Id: I5db1de3ee8e179edd56c93988b821242b81c2387
2018-01-11 18:16:20 +09:00
Lorenzo Colitti
a033382c50 Merge "Move more core networking tests to framework/base/tests/net." am: 7571202ce2
am: 8f852c341f

Change-Id: Iab87e7ce5b62a1ff21c7aee5d0f25597713f6c65
2018-01-11 04:10:01 +00:00
Lorenzo Colitti
7571202ce2 Merge "Move more core networking tests to framework/base/tests/net." 2018-01-11 03:09:40 +00:00
Lorenzo Colitti
640bec275d Move more core networking tests to framework/base/tests/net.
Test: "runtest frameworks-net" passes except for already-failing IpConnectivityMetricsTest
Change-Id: I2a20d546089699ac67bc819f10a8fcd50c637ac4
2018-01-10 23:35:16 +09:00
Malcolm Chen
5ccf698a78 Merge "Add isMobileDataEnabled in TelephonyManager." am: 7b34214a6a
am: 6b943d5deb

Change-Id: I132cc6d3de77f20717a40884683fb0c81fbb7083
2018-01-10 00:06:27 +00:00
Treehugger Robot
7b34214a6a Merge "Add isMobileDataEnabled in TelephonyManager." 2018-01-09 23:46:55 +00:00
Benedict Wong
96b8f818af Merge "Add validation to IpSecConfig algorithm setters" am: a954f20f46
am: c93df5ca1c

Change-Id: I45289bc8e8b93f7eb912a76a10b951b1a615338a
2018-01-09 19:51:19 +00:00
Malcolm Chen
120de8cbe6 Add isMobileDataEnabled in TelephonyManager.
Added a new hidden API isMobileDataEnabled in TelephonyManager.
Rename related APIs to isUserMobileDataEnabled,
isUserMobileDataEnabled and setUserMobileDataEnabled to better
clarify their functionality.

Bug: 69814555
Test: build
Change-Id: I2f186f1e7550cafbe4ee3a5af293c39274cbfeaa
Merged-In: I2f186f1e7550cafbe4ee3a5af293c39274cbfeaa
2018-01-08 18:08:22 -08:00
Benedict Wong
48db30d4c7 Add validation to IpSecConfig algorithm setters
Adds checks to ensure that users can only set the correct types of
algorithms for the Authentication, Encryption and Authenticated
Encryption algorithms.

Bug: 65223935
Test: Added tests in IpSecConfigTest, and passed on aosp_marlin-eng
Change-Id: I462c77d9eb5710b8d03a48866453649d3b6fc6bf
2018-01-04 16:56:40 -08:00
Benedict Wong
1281a3629a Merge "[ipsec-doze] Add fchown to IpSecService to support doze" am: 4edb4c8ec4
am: 5949912523

Change-Id: I9036fc2768dd9664ab7407b359f3c689c7ce700e
2017-12-20 18:42:26 +00:00
Benedict Wong
46a6429f68 Merge "[ipsec-qtaguid] Tag sockets upon creation of encap sockets" am: 12045eafe6
am: 8caa274ade

Change-Id: I2f27c76a1f493ff4f0bd423c06f159e629866d4d
2017-12-19 00:27:57 +00:00