Commit Graph

3746 Commits

Author SHA1 Message Date
Chiachang Wang
d94e7d893b Merge "Data stall detection using DNS event" am: 33fe80f927 am: 69b60f5a31
am: f720f0dbf8

Change-Id: I5c443b959a45b3a70902d5c9738a1687e16cc766
2018-11-27 20:33:20 -08:00
Chiachang Wang
f720f0dbf8 Merge "Data stall detection using DNS event" am: 33fe80f927
am: 69b60f5a31

Change-Id: I35e7e81fa0d6db6527ea6dd606d00046df3b9818
2018-11-27 20:18:54 -08:00
Chiachang Wang
33fe80f927 Merge "Data stall detection using DNS event" 2018-11-28 03:53:30 +00:00
Chiachang Wang
7a70a7e0ed Data stall detection using DNS event
If dns resolver on a network get consecutively timeout then it
is a strong signal that the network is no longer usable.
Reevaluate the network once it's data stall suspected

Test: 1. runtest frameworks-net
      2. SettingsBackupTest passes
      2. Run on wifi w/o internet capability
Bug: 112653893, 113916551

Change-Id: I74287b174d933f97a91fa1529b1809856ac3b38d
2018-11-27 18:00:05 +08:00
Benedict Wong
1215943a55 Merge changes from topic "xfrmi-support" am: f928c1e4b9 am: bc33474522
am: 03c6d371aa

Change-Id: I9c543d38c88181b12cdbc7bdb93d7e38f1dfd425
2018-11-25 19:38:35 -08:00
Benedict Wong
03c6d371aa Merge changes from topic "xfrmi-support" am: f928c1e4b9
am: bc33474522

Change-Id: I13a826f5ae3c4cb700be789b369848685da1bc41
2018-11-25 19:26:26 -08:00
Benedict Wong
781dae6306 Add XFRM-I support to IpSecService
This change adds support for XFRM-I to all IpSecService netd calls.
Fallback logic is in netd, and thus both VTI and XFRM-I parameters are
always passed down to IpSecService.

Bug: 78589502
Test: All java, CTS tests passing
Change-Id: Ie4186f0ad7e50763b21831f6fa411b5ee436de78
2018-11-21 08:34:54 -08:00
Benedict Wong
ab80e1fb30 Disable attempted updating of SA marks
SA marks are never updated during the UPDSA call. This change disables
the attempts to update the specified SAs, ensuring that the config
stored in IpSecService matches that of the allocated kernel resources.

Bug: 111854872
Test: Unit, CTS tests passing
Change-Id: Ic1fb862c8021ffa260c3e262ec698d8af0a826d9
2018-11-21 08:34:54 -08:00
Jack Yu
af2218bde6 Merge "Move hidden APIs into system APIs" am: 860d8d0d80
am: c3375240ba

Change-Id: Ibe6fa27d99791e57b1253a9dc990de0706b52fb6
2018-11-20 19:04:24 -08:00
Jack Yu
860d8d0d80 Merge "Move hidden APIs into system APIs" 2018-11-21 02:40:30 +00:00
Etan Cohen
5faec91513 Merge "Add IPv6 link-local address generation from EUI-48" am: a2a9df3e3a
am: 674479afe5

Change-Id: I63de4fa185649d9389a771860c479899e90b37e4
2018-11-19 16:48:22 -08:00
Jack Yu
4f956e0fca Move hidden APIs into system APIs
To allow vendor code to construct LinkAddress, which is
one of the parameter in the system API DataCallResponse.

Test: Build
Bug: 73659459
Merged-In: I3e203781d3a03285fa0e047cc8837ccb4a09016a
Change-Id: I3e203781d3a03285fa0e047cc8837ccb4a09016a
2018-11-19 14:40:13 -08:00
Jack Yu
b400507670 Move hidden APIs into system APIs
To allow vendor code to construct LinkAddress, which is
one of the parameter in the system API DataCallResponse.

Test: Build
Bug: 73659459
Change-Id: I3e203781d3a03285fa0e047cc8837ccb4a09016a
2018-11-19 14:37:44 -08:00
Etan Cohen
a8923c5aea Add IPv6 link-local address generation from EUI-48
Add a utility method to convert an EUI-48 to an IPv6 link-local
address based on RFC 4291 (EUI-64 generation) followed by RFC 4862.

Bug: 117605977
Test: atest MacAddressTest
Merged-In: I80b683e69da6beff3b37fc345fc15aa9610d09b7
Change-Id: I80b683e69da6beff3b37fc345fc15aa9610d09b7
2018-11-16 21:50:24 -08:00
Etan Cohen
a4824cf401 Add IPv6 link-local address generation from EUI-48
Add a utility method to convert an EUI-48 to an IPv6 link-local
address based on RFC 4291 (EUI-64 generation) followed by RFC 4862.

Bug: 117605977
Test: atest MacAddressTest
Change-Id: I80b683e69da6beff3b37fc345fc15aa9610d09b7
2018-11-16 14:00:22 -08:00
Roshan Pius
d84d668d45 Merge changes from topic "network_request_match_callback"
* changes:
  WifiManager: Network request match callback registration
  wifi(API): NetworkSpecifier for Wifi NetworkAgent
  wifi(API): Mark old API's deprecated
  wifi(API): New API surface for network suggestion
  wifi(API): New API surface for connection via NetworkRequest
2018-11-06 17:42:58 +00:00
Junyu Lai
e914f1e453 Merge "Extend onDnsEvent callback to report more fields." am: 89eb3e6117 am: 7a782be65d
am: 556ae82025

Change-Id: I50ef791009b0e9301ba10d8e52c3fd6c15e6b938
2018-11-04 21:05:47 -08:00
Junyu Lai
556ae82025 Merge "Extend onDnsEvent callback to report more fields." am: 89eb3e6117
am: 7a782be65d

Change-Id: Ic1b35f2b02dc60e301d39e89008617b341194382
2018-11-04 20:54:14 -08:00
Junyu Lai
89eb3e6117 Merge "Extend onDnsEvent callback to report more fields." 2018-11-05 04:29:47 +00:00
Luke Huang
13801b90e2 Merge "interface-related commands porting" am: 808c2fa747 am: 21fecd5957
am: f1fba3e8fd

Change-Id: I7a44b6e8521dd2a852bbd7b4e07599df8951f7b2
2018-11-01 00:46:40 -07:00
Luke Huang
f1fba3e8fd Merge "interface-related commands porting" am: 808c2fa747
am: 21fecd5957

Change-Id: Iab8092b55399397d9e9f2333ce358964562daed7
2018-11-01 00:31:30 -07:00
Luke Huang
808c2fa747 Merge "interface-related commands porting" 2018-11-01 07:09:54 +00:00
Roshan Pius
99cfe09fa2 wifi(API): NetworkSpecifier for Wifi NetworkAgent
Create an @hide NetworkSpecifier to use by the Wifi NetworkAgent. This
will be used by connectivity service to match the incoming
NetworkRequest (with WifiNetworkSpecifier) with the NetworkAgent we
created to serve that request.
The WifiNetworkAgentSpecifier will hold the current connected wifi
network configuration which will be used to pattern match the
WifiNetworkSpecifier from NetworkRequest's.

Also, added a @hide helper method in MacAddress to help with matching
bssid pattern.

Bug: 113878056
Test: Unit tests
Change-Id: I9a643f0b914d48ff64104c798ec2869db40cb24b
2018-10-31 09:23:15 -07:00
junyulai
4c2d2d5461 Extend onDnsEvent callback to report more fields.
When native layer reports onDnsEvent, netId, eventType and
returnCode are available only in NetdEventListenerService, but
not for the clients who register event on it.

Thus, extend the callback to give clients more detail on the
network the look up was performed on and the result of the
lookup.

Bug: 113916551
Test: 1. runtest frameworks-net
      2. runtest frameworks-services -c com.android.server. \
         net.watchlist.NetworkWatchlistServiceTests
Change-Id: If7beecea50e1baf18cb5c6775ad3ecb1a60b312a
2018-10-31 21:22:45 +08:00
Junyu Lai
74d5f7f24a Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on." am: 0d63da86e2 am: d62c2baa6d
am: cadfe44e05

Change-Id: I9d0d8b67ed0159ba2a71059620ebe5698eb79ccb
2018-10-30 19:56:01 -07:00
Junyu Lai
cadfe44e05 Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on." am: 0d63da86e2
am: d62c2baa6d

Change-Id: I3ee791e4b6fdd9d508807810183dc02c69bd2c0b
2018-10-30 19:46:18 -07:00
junyulai
c33ac0d43b Fix negative uid stats caused by 464xlat adjust when eBPF is on.
When using xt_qtaguid to count per uid stats,
NetworkStatsService needs to adjust the 464xlat traffic since
iptables module would double count for ipv4 and ipv6 packet.
But for eBPF, the per uid stats is collected in a different
hook, so the adjustment on root uid would only be needed in tx
direction.

Bug: 112226716
Test: 1. Make ipv4 traffic in ipv6-only network and check data
         usage.
      2. Make ipv4 traffic in a client which connect to
         ipv6-only hotspot.
      3. runtest frameworks-net
      4. cts-tradefed run cts -m CtsNetTestCases -t \
                 android.net.cts.TrafficStatsTest
      5. cts-tradefed run cts -m CtsUsageStatsTestCases

Change-Id: Ic9a84f5446eddc943c255d5f3b89dad171f53cac
2018-10-30 21:23:38 +08:00
Luke Huang
8c12dcd11a Merge "Refactor UidRange by using stable aidl structure" am: d1d3b374b7 am: 53c8b8a939
am: 68f4bd92bc

Change-Id: I82e06fe93a3ed88368b649ef8d3283322191ffe7
2018-10-28 18:06:15 -07:00
Luke Huang
68f4bd92bc Merge "Refactor UidRange by using stable aidl structure" am: d1d3b374b7
am: 53c8b8a939

Change-Id: I09ac7fc6525948b76114ef936dc1b3d2d1bae0fb
2018-10-28 17:55:57 -07:00
Treehugger Robot
d1d3b374b7 Merge "Refactor UidRange by using stable aidl structure" 2018-10-29 00:17:34 +00:00
Luke Huang
1edf4c6397 Merge "Firewall-related commands porting" am: 1acfa7de1b am: 6ba18c6b03
am: b87796365e

Change-Id: I3a2d3115a9664fd2be458076d7a7092a7cb5293c
2018-10-25 21:21:01 -07:00
Chalard Jean
96d551145d Merge "To support skip464xlat per Network" am: a01c77a499 am: e826aa52e4
am: fbb737678b

Change-Id: I4a6d7480e2e7e775e511cc7eaaabe65b6a3bde7d
2018-10-25 20:09:15 -07:00
Luke Huang
14f7544c3e interface-related commands porting
Test: runtest frameworks-net passes
Test: manual testing of interface related function works(tethering)
Change-Id: Ie1a1ac00c28ef914d62e7d75b0db8c2434c810d2
2018-10-25 16:40:47 +09:00
Luke Huang
b87796365e Merge "Firewall-related commands porting" am: 1acfa7de1b
am: 6ba18c6b03

Change-Id: I15cedc624dc20168edc8feecf78affb9fad5482b
2018-10-24 19:49:58 -07:00
Luke Huang
1acfa7de1b Merge "Firewall-related commands porting" 2018-10-25 00:20:12 +00:00
Chalard Jean
fbb737678b Merge "To support skip464xlat per Network" am: a01c77a499
am: e826aa52e4

Change-Id: I944738258051525b371bd17dd3ee7b411b82d12b
2018-10-24 17:19:51 -07:00
Nathan Harold
41e2d7494f Merge "Move some members to the "Q blacklist"." am: f5cf9f24ed
am: 13c9e7e2f3

Change-Id: Ia2419cce28d26d9464da2a5172cb332b629e943e
2018-10-24 16:14:06 -07:00
Luke Huang
77017913a4 Refactor UidRange by using stable aidl structure
Use stable aidl generated structure instead of UidRange

Test: runtest frameworks-net passes
Test: manual testing of UidRange related function works
Change-Id: Iaf1c10777dc1e71df2be2a57533a10257b12626b
2018-10-24 19:45:09 +09:00
Chalard Jean
a01c77a499 Merge "To support skip464xlat per Network" 2018-10-24 07:15:20 +00:00
Luke Huang
a241db9df7 Firewall-related commands porting
Test: runtest frameworks-net passes
Test: manual testing of firewall works
Change-Id: Ic19c3872988a2b5dd315feb57e0757797d00a6ac
2018-10-24 13:12:41 +09:00
Mathew Inwood
45d2c252b1 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a4)
2018-10-22 17:28:24 -07:00
Junyu Lai
555917c3b0 Merge "Add new callback to inform blocking of network on specific uid." am: f709e754ab am: 745952eac8
am: 70626e3b94

Change-Id: I2bec503c5ffac156b679a48c09591458ab716789
2018-10-19 09:47:40 -07:00
Junyu Lai
70626e3b94 Merge "Add new callback to inform blocking of network on specific uid." am: f709e754ab
am: 745952eac8

Change-Id: I24b45f860992626968a6adfb0ff6b6389c85cf45
2018-10-19 09:26:39 -07:00
Junyu Lai
f709e754ab Merge "Add new callback to inform blocking of network on specific uid." 2018-10-19 15:20:48 +00:00
Chalard Jean
03eb7e1905 Merge "Fix a bug where Uri can't parse IPv6 literal addresses." am: 54677a86d4 am: 86ff3f4c7a
am: 6997192f35

Change-Id: I591c592e64a48f71f5528d999426343977fe48ce
2018-10-19 06:28:37 -07:00
Chalard Jean
6997192f35 Merge "Fix a bug where Uri can't parse IPv6 literal addresses." am: 54677a86d4
am: 86ff3f4c7a

Change-Id: Iec4629bc84bb32185be7120a6f5dfc5e97a5dbff
2018-10-19 06:14:19 -07:00
Chalard Jean
1a1d52ebb4 Fix a bug where Uri can't parse IPv6 literal addresses.
Bug: 25540738
Test: added CTS in aosp change #793137 and ran them
Change-Id: Ibf870b7e87799090fae9ed456286c11990b01461
2018-10-19 11:25:27 +09:00
Eran Messeri
5cb1e8e636 Merge "Enterprise Policy for Private DNS Setting" 2018-10-17 16:59:57 +00:00
Lorenzo Colitti
03fc4a7f68 Merge "Change permissions checks for setAirplaneMode." am: 3889ff53ed am: 10c175041e
am: 3d23e905a9

Change-Id: Icfc55aefa11a5e1dd92382c2be94c7b63889aa8f
2018-10-15 08:49:52 -07:00
Lorenzo Colitti
3d23e905a9 Merge "Change permissions checks for setAirplaneMode." am: 3889ff53ed
am: 10c175041e

Change-Id: Ibe5bbd51adae83e1bfb5a4ab43d29eb2ccd02a8b
2018-10-15 08:29:00 -07:00