Commit graph

13,045 commits

Message SHA1
am 1011960c: am decfd707: Merge "Add the calling package name to requestRouteToHost" into klp-dev
* commit '1011960c44a4f84d53d05199fe1ca09be9473822':
  Add the calling package name to requestRouteToHost

Chad Brubaker   authored and   Android Git Automerger   commited 2014-03-13 18:18:36 +00:00
fc2c67b7ee
ConnectivityService: add support to set TCP initial rwnd
The value for the TCP initial receive window comes from,
in order,

kernel
  /proc/sys/net/ipv4/tcp_default_init_rwnd

init.rc (via properties)
  net.tcp.default_init_rwnd

properties
  net.tcp.default_init_rwnd

gservices
  Settings.Global.TCP_DEFAULT_INIT_RWND

Bug: 12020135
Change-Id: I0e271be19472900fa9f3bab037d53383ec014a9e

JP Abgrall   commited 2014-03-12 20:22:47 -07:00
fe9b47e6d0
am 7fb07438: am 674f85af: Merge "Only allow System apps to make VPN exempt routes" into klp-dev
* commit '7fb074389370ac93afc5830189371dc3ec26265c':
  Only allow System apps to make VPN exempt routes

Chad Brubaker   authored and   Android Git Automerger   commited 2014-03-12 23:21:05 +00:00
be0a332496
am 1011960c: am decfd707: Merge "Add the calling package name to requestRouteToHost" into klp-dev
* commit '1011960c44a4f84d53d05199fe1ca09be9473822':
  Add the calling package name to requestRouteToHost

Chad Brubaker   authored and   Android Git Automerger   commited 2014-03-12 23:21:02 +00:00
3703c501eb
Remove SO_BINDTODEVICE from VPN protect
SO_BINDTODEVICE is not needed with policy routing.
SO_BINDTODEVICE was also used on the default iface which causes problems
when the default iface is IPv6 only and the socket tries to connect to a
IPv4 address.

Bug: 12940882
Change-Id: I5b2bde0ac5459433fc5749f509072a548532f730

Chad Brubaker   commited 2014-03-11 10:58:19 -07:00
4452b850e3
merge in master-release history after reset to master
The Android Automerger   commited 2014-03-06 05:49:59 -08:00
b0f3386fa3
am 2d07e8d6: am c1ca3bac: am 4d23e4b2: am 7a54d1df: am bad3a9e6: am 2d1e8c49: Merge "Only apply tcp buffer sizes for default net" into klp-dev
* commit '2d07e8d60e44e320b0c39d63e763d79a7befadf3':
  Only apply tcp buffer sizes for default net

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-03-06 00:14:30 +00:00
a8dd68fc6f
am 7a54d1df: am bad3a9e6: am 2d1e8c49: Merge "Only apply tcp buffer sizes for default net" into klp-dev
* commit '7a54d1dfdc':
  Only apply tcp buffer sizes for default net

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-03-05 22:14:46 +00:00
4d23e4b287
Only allow System apps to make VPN exempt routes
requestRouteToHost will only allow system applications to make routes
exempt from the VPN's routing rules.

If a VPN is currently running and a non-system app requests a route it
will only succeed if that host is currently covered by a VPN exempt
routing rule. Otherwise it will fail.

For example, if a VPN is running and the MMS network is brought online
those routes will be added as VPN exempt. If an application then tries
to request a route to a MMS endpoint it will succeed because the routes
already exist. If an application tries to request a route to a host
covered by the VPN the call will fail.

Bug: 12937545
Change-Id: If7bcec91bbb96c62c8fb69748c975847e6c00b6f

Chad Brubaker   commited 2014-03-05 13:35:36 -08:00
6c0af46240
Add the calling package name to requestRouteToHost
The calling package name will be used to check if an application is a
system application when deciding if a route should be exempt from VPN
routing rules.

Bug: 12937545
Change-Id: I2c09c875fe9bb9685871a0a801ddcbb32fc17405

Chad Brubaker   commited 2014-03-05 13:35:20 -08:00
abe885124b
am bad3a9e6: am 2d1e8c49: Merge "Only apply tcp buffer sizes for default net" into klp-dev
* commit 'bad3a9e66fb103ec96ea89ce9eff7270333d5926':
  Only apply tcp buffer sizes for default net

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-03-05 18:31:18 +00:00
7a54d1dfdc
merge in master-release history after reset to master
The Android Automerger   commited 2014-03-05 08:05:42 -08:00
a3adc77bd7
Only apply tcp buffer sizes for default net
This may mean that secondary networks have bad network settings,
but currently default settings are overriden by secondary nets
which seems worse.

bug:13211589
Change-Id: I08d56e618208781bf6b21a88663c2b8503a4f226

Robert Greenwalt   commited 2014-03-04 09:56:05 -08:00
c26eb014e0
Merge "Return detailed reason of invalid proxy settings"
Yuhao Zheng   authored and   Android (Google) Code Review   commited 2014-03-04 17:43:47 +00:00
58700af05a
Merge "Only apply tcp buffer sizes for default net"
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-03-04 17:20:18 +00:00
dfdaa016bf
Return detailed reason of invalid proxy settings
Make Proxy.validate() return valid/invalid int code, instead of throwing
exceptions. If invalid, detailed reason code is returned (currently for
Settings UI use).

bug: 13248097
Change-Id: Ic68d03f666f1cd63667afc311de7dc370d233901

Yuhao Zheng   commited 2014-03-03 11:23:07 -08:00
12df4ac68e
Only apply tcp buffer sizes for default net
This may mean that secondary networks have bad network settings,
but currently default settings are overriden by secondary nets
which seems worse.

bug:13211589
Change-Id: I3ef1a17ccde05306d786729c4369a31f78b2ebcf

Robert Greenwalt   commited 2014-03-03 10:26:11 -08:00
9f25cdc323
merge in master-release history after reset to master
The Android Automerger   commited 2014-03-01 05:50:36 -08:00
a10a869c02
Hold a wake lock while dispatching network activity events.
Also add new API for determining whether the current data network
is active, and thus better scheduling network operations.  This
API is designed to not be tied to a mobile network -- regardless
of the network, apps can use it to determine whether they should
initiate activity or wait.  On non-mobile networks, it simply always
reports as the network being active.

This changed involved reworking how the idle timers are done so
that we only register an idle timer with the current default
network.  This way, we can know whether we currently expect to
get callbacks about the network being active, or should just always
report that it is active.  (Ultimately we need to be getting this
radio active data from the radio itself.)

Change-Id: Iaf6cc91a960d7542a70b72f87a7db26d12c4ea8e

Dianne Hackborn   commited 2014-02-28 15:19:39 -08:00
b4b09e8a97
Merge "Remove SO_BINDTODEVICE from VPN protect"
Chad Brubaker   authored and   Android (Google) Code Review   commited 2014-02-28 19:28:45 +00:00
7b0eca3a7d
merge in master-release history after reset to master
The Android Automerger   commited 2014-02-26 05:50:00 -08:00
2e8ecb34d4
am 8395aadb: (-s ours) am 860ac9e4: am 94d5c80a: am 635097ff: am cf73f46a: am df3b5e5b: am 3c73a8e8: (-s ours) am ca4ba835: am 41708e1c: DO NOT MERGE Sanitize WifiConfigs
* commit '8395aadbd3b2a11fac664f44c590576141c78615':
  DO NOT MERGE Sanitize WifiConfigs

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-02-25 18:36:45 +00:00
9a2ef0b576
am 635097ff: am cf73f46a: am df3b5e5b: am 3c73a8e8: (-s ours) am ca4ba835: am 41708e1c: DO NOT MERGE Sanitize WifiConfigs
* commit '635097ffe6':
  DO NOT MERGE Sanitize WifiConfigs

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-02-25 18:25:11 +00:00
94d5c80a2b
am cf73f46a: am df3b5e5b: am 3c73a8e8: (-s ours) am ca4ba835: am 41708e1c: DO NOT MERGE Sanitize WifiConfigs
* commit 'cf73f46a514f5c2b1a0de137ed203401417307b4':
  DO NOT MERGE Sanitize WifiConfigs

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-02-25 18:21:50 +00:00
635097ffe6
am 3c73a8e8: (-s ours) am ca4ba835: am 41708e1c: DO NOT MERGE Sanitize WifiConfigs
* commit '3c73a8e87a':
  DO NOT MERGE Sanitize WifiConfigs

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-02-25 18:14:26 +00:00
df3b5e5bda
am ca4ba835: am 41708e1c: DO NOT MERGE Sanitize WifiConfigs
* commit 'ca4ba83574':
  DO NOT MERGE Sanitize WifiConfigs

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-02-25 10:12:35 -08:00
3c73a8e87a
am 41708e1c: DO NOT MERGE Sanitize WifiConfigs
* commit '41708e1c6e':
  DO NOT MERGE Sanitize WifiConfigs

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-02-25 10:09:13 -08:00
ca4ba83574
merge in master-release history after reset to master
The Android Automerger   commited 2014-02-25 05:50:07 -08:00
7d7c680b41
DO NOT MERGE Sanitize WifiConfigs
Do this both on input from apps (giving error) and between wifi and
ConnectivityService (ignoring bad data).  This means removing all
addresses beyond the first and all routes but the first default and
the implied direct-connect routes.

We do this because the user can't monitor the others (no UI), their
support wasn't intended, they allow redirection of all traffic
without user knowledge and they allow circumvention of legacy VPNs.

This should not move forward from JB as it breaks IPv6 and K has
a more resilient VPN.

Bug:12663469
Change-Id: I0d92db7efc30a1bb3e5b8c6e5595bdb9793a16f2

Conflicts:
	core/java/android/net/LinkProperties.java
	services/java/com/android/server/WifiService.java
	wifi/java/android/net/wifi/WifiStateMachine.java

Robert Greenwalt   commited 2014-02-24 15:20:32 -08:00
41708e1c6e
Remove unneeded new RIL command.
Remove the recently added RIL_REQUEST_SET_RADIO_MODE command and update
the definition of the RIL_REQUEST_NV_RESET_CONFIG parameter.
Also remove some accidentally added debug log lines.

Bug: 12864208
Change-Id: I6f035d6900c9fcb1427bad62057d7b4a1d3cd99c

Jake Hamby   authored and   The Android Automerger   commited 2014-02-24 12:29:53 -08:00
d38e37956b
Remove unneeded new RIL command.
Remove the recently added RIL_REQUEST_SET_RADIO_MODE command and update
the definition of the RIL_REQUEST_NV_RESET_CONFIG parameter.
Also remove some accidentally added debug log lines.

Bug: 12864208
Change-Id: I6f035d6900c9fcb1427bad62057d7b4a1d3cd99c

Jake Hamby   commited 2014-02-24 11:42:51 -08:00
19ab991213
Merge "Only allow System apps to make VPN exempt routes"
Chad Brubaker   authored and   Android (Google) Code Review   commited 2014-02-24 18:09:56 +00:00
c92e61c782
Merge "Add the calling package name to requestRouteToHost"
Chad Brubaker   authored and   Android (Google) Code Review   commited 2014-02-24 18:09:36 +00:00
f6c68ca61a
Only allow System apps to make VPN exempt routes
requestRouteToHost will only allow system applications to make routes
exempt from the VPN's routing rules.

If a VPN is currently running and a non-system app requests a route it
will only succeed if that host is currently covered by a VPN exempt
routing rule. Otherwise it will fail.

For example, if a VPN is running and the MMS network is brought online
those routes will be added as VPN exempt. If an application then tries
to request a route to a MMS endpoint it will succeed because the routes
already exist. If an application tries to request a route to a host
covered by the VPN the call will fail.

Bug: 12937545
Change-Id: If7bcec91bbb96c62c8fb69748c975847e6c00b6f

Chad Brubaker   commited 2014-02-21 15:30:02 -08:00
83ec7fcb2b
ConnectivityService: add support to set TCP initial rwnd
The value for the TCP initial receive window comes from,
in order,

kernel
  /proc/sys/net/ipv4/tcp_default_init_rwnd

init.rc (via properties)
  net.tcp.default_init_rwnd

properties
  net.tcp.default_init_rwnd

gservices
  Settings.Global.TCP_DEFAULT_INIT_RWND

Bug: 12020135
Change-Id: I0e271be19472900fa9f3bab037d53383ec014a9e

JP Abgrall   commited 2014-02-21 12:05:20 -08:00
d3bc570b7b
Modify unexpected mtu debug message to print mtu
Change-Id: Iacc78582c5e3d6b156e8e2eda25e89e0e5be6eda

Patrick Tjin   commited 2014-02-19 12:53:04 -08:00
870078d85a
Add the calling package name to requestRouteToHost
The calling package name will be used to check if an application is a
system application when deciding if a route should be exempt from VPN
routing rules.

Bug: 12937545
Change-Id: I2c09c875fe9bb9685871a0a801ddcbb32fc17405

Chad Brubaker   commited 2014-02-19 11:04:49 -08:00
170386ea78
Remove SO_BINDTODEVICE from VPN protect
SO_BINDTODEVICE is not needed with policy routing.
SO_BINDTODEVICE was also used on the default iface which causes problems
when the default iface is IPv6 only and the socket tries to connect to a
IPv4 address.

Bug: 12940882
Change-Id: I5b2bde0ac5459433fc5749f509072a548532f730

Chad Brubaker   commited 2014-02-13 18:19:43 -08:00
e05e257bd0
Start tracking radio up time.
We now always turn on network state tracking for mobile,
and push this information down to battery stats.

In battery stats we use this to both log the changes in
the history and keep track of the total time the mobile
radio was active.

Power computation is switched over to using this information
to help determine power use, which will hopefully make it
more accurate (not counting inaccuracies in knowing when it
actually goes down).

Note yet done is aggregating this data per-uid, to better
emphasize which apps are causing the radio to be up.  Right
now we just spread the total time across all uids weighted
by the total number of packets they have sent and received.

Also put in the battery stats infrastructure for bluetooth to
address issue #12973036: Improve power_profile.xml

Change-Id: I39d11b7ff6ae4f336f253d1cba308d8569de7e0d

Dianne Hackborn   commited 2014-02-13 17:55:40 +00:00
5da0d5a316
Add new RIL commands to read/write NV items and reset NV config.
Add new RIL commands and generic code cleanups.

The only changes required for OMA DM support are the
addition of five new methods in ITelephony.aidl for
reading/writing NV items and performing NV config and
radio resets (requires MODIFY_PHONE_STATE), along with
the new RIL request IDs in RILConstants.java.

Bug: 12864208
Change-Id: I958d2571580d98a49936ef2e6822e5ac086acbe2

Jake Hamby   commited 2014-02-03 15:52:18 -08:00
5f5d4337b1
am 3cab7fc1: Merge "Add proxy as another network." into klp-modular-dev
* commit '3cab7fc1b8f06166df3a58cf10d4a0db36bde788':
  Add proxy as another network.

Hui Lu   authored and   Android Git Automerger   commited 2014-01-31 08:11:57 +00:00
abb57909e0
Add proxy as another network.
Change-Id: I70cb6ac5604c4f0d6a752a291c40de2445ae98bb

Hui Lu   commited 2014-01-30 17:26:18 -05:00
07f2933a07
Clean up dhcp no-op logging
bug:10553167
Change-Id: I1f6feb9a44e17d45ffc9f28b37bf5690230a3ade

Robert Greenwalt   commited 2014-01-23 16:05:25 -08:00
593cc7af27
am 6ac202be: Move some system services to separate directories
* commit '6ac202be31':
  Move some system services to separate directories

Amith Yamasani   authored and   Android Git Automerger   commited 2013-12-19 23:30:35 +00:00
ae31a40841
Move some system services to separate directories
Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85

Amith Yamasani   commited 2013-12-19 15:25:37 -08:00
6ac202be31
am 263c4788: am a58711d5: am b4ccc540: Merge "Add address flags and scope to LinkAddress."
* commit '263c4788dcf45f104f8668fd6621d1a7c39689b9':
  Add address flags and scope to LinkAddress.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2013-12-09 18:34:44 +00:00
fdd455785e
am b4ccc540: Merge "Add address flags and scope to LinkAddress."
* commit 'b4ccc54079':
  Add address flags and scope to LinkAddress.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2013-12-09 10:28:19 -08:00
a58711d5b5
Merge "Add address flags and scope to LinkAddress."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2013-12-07 02:43:04 +00:00
b4ccc54079
Add address flags and scope to LinkAddress.
This is necessary so that the framework can know whether an IPv6
address is likely to be usable (i.e., if it's global scope and
preferred). Also, it will simplify the address notification
methods in INetworkManagementEventObserver, which currently take
the address, the flags, and the scope as separate arguments.

1. Add flags and scope to the class and update the unit test.
   Use the IFA_F_* and RT_SCOPE_* constants defined by libcore.
   Since most callers don't know about flags and scope, provide
   constructors that default the flags to zero and determine the
   scope from the address. Addresses notified by the kernel will
   have these properly set. Make multicast addresses invalid.
   Update the class documentation.
2. Provide an isSameAddressAs() method that compares only the
   address and prefix information between two LinkAddress
   objects. This is necessary because an interface can't have
   two addresses with the same address/prefix but different
   flags.
3. Update LinkProperties's addLinkAddress and removeLinkAddress
   to identify existing addresses to add/remove using
   isSameAddressAs instead of implicit equals(). Specifically:
   - If addLinkAddress is called with an address that is already
     present, the existing address's flags and scope are updated.
     This allows, for example, an address on an interface to go
     from preferred to deprecated when it expires, without it
     having to be removed and re-added.
   - If removeLinkAddress is called with an address that is
     present but with different flags, it deletes that address
     instead of failing to find a match.
4. Update the INetworkManagementEventObserver address
   notification methods to take just a LinkAddress instead of
   LinkAddress, flags, and scope. While I'm at it, change the
   order of the arguments for consistency with the other
   functions in the interface.

Change-Id: Id8fe0f09a7e8f6bee1ea3b52102178b689a9336e

Lorenzo Colitti   commited 2013-12-06 13:54:35 +09:00
4ea70b7743
am dcff5cef: am 35e36de6: am 8a49a518: Merge commit \'bac61807d3bcfff957b358cb9ad77850bd373689\' into HEAD
* commit 'dcff5ceff6ef0050af4c49a8c2a86ab663a88665':

The Android Open Source Project   authored and   Android Git Automerger   commited 2013-12-06 02:50:46 +00:00
93dfe5add6