Commit Graph

1776 Commits

Author SHA1 Message Date
Chad Brubaker
79cba313f8 Merge "Remove SO_BINDTODEVICE from VPN protect" 2014-02-28 19:28:45 +00:00
The Android Automerger
718514a794 merge in master-release history after reset to master 2014-02-26 05:50:00 -08:00
Robert Greenwalt
f7830a6b87 am 8395aadb: (-s ours) am 860ac9e4: am d9aebd55: am 86321b8c: am cf73f46a: am ba71f589: am 7261e86e: (-s ours) am 4aadb99c: am 2d3f03d7: DO NOT MERGE Sanitize WifiConfigs
* commit '8395aadbd3b2a11fac664f44c590576141c78615':
  DO NOT MERGE Sanitize WifiConfigs
2014-02-25 18:36:45 +00:00
Robert Greenwalt
d9aebd5551 am 86321b8c: am cf73f46a: am ba71f589: am 7261e86e: (-s ours) am 4aadb99c: am 2d3f03d7: DO NOT MERGE Sanitize WifiConfigs
* commit '86321b8ce61f8f07191041c079e88a9dc610aa38':
  DO NOT MERGE Sanitize WifiConfigs
2014-02-25 18:25:11 +00:00
Robert Greenwalt
86321b8ce6 am cf73f46a: am ba71f589: am 7261e86e: (-s ours) am 4aadb99c: am 2d3f03d7: DO NOT MERGE Sanitize WifiConfigs
* commit 'cf73f46a514f5c2b1a0de137ed203401417307b4':
  DO NOT MERGE Sanitize WifiConfigs
2014-02-25 18:21:50 +00:00
Robert Greenwalt
ba71f589fb am 7261e86e: (-s ours) am 4aadb99c: am 2d3f03d7: DO NOT MERGE Sanitize WifiConfigs
* commit '7261e86ef6464005603a48ab9289f7516a7ea3d4':
  DO NOT MERGE Sanitize WifiConfigs
2014-02-25 18:14:26 +00:00
Robert Greenwalt
7261e86ef6 am 4aadb99c: am 2d3f03d7: DO NOT MERGE Sanitize WifiConfigs
* commit '4aadb99cfb14dc955967a5fed60d7138ce7ee068':
  DO NOT MERGE Sanitize WifiConfigs
2014-02-25 10:12:35 -08:00
Robert Greenwalt
4aadb99cfb am 2d3f03d7: DO NOT MERGE Sanitize WifiConfigs
* commit '2d3f03d7fb5d955cd16d4152c8767c7974ebb54e':
  DO NOT MERGE Sanitize WifiConfigs
2014-02-25 10:09:13 -08:00
The Android Automerger
83a16caee9 merge in master-release history after reset to master 2014-02-25 05:50:07 -08:00
Robert Greenwalt
2d3f03d7fb 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
2014-02-24 15:20:32 -08:00
Jake Hamby
19be149de7 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
2014-02-24 12:29:53 -08:00
Jake Hamby
5c874c7354 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
2014-02-24 11:42:51 -08:00
Chad Brubaker
d35af171e4 Merge "Only allow System apps to make VPN exempt routes" 2014-02-24 18:09:56 +00:00
Chad Brubaker
4dc2fda2a7 Merge "Add the calling package name to requestRouteToHost" 2014-02-24 18:09:36 +00:00
Chad Brubaker
7965e0a452 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
2014-02-21 15:30:02 -08:00
JP Abgrall
3cf7d6c69d 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
2014-02-21 12:05:20 -08:00
Patrick Tjin
d67d197da0 Modify unexpected mtu debug message to print mtu
Change-Id: Iacc78582c5e3d6b156e8e2eda25e89e0e5be6eda
2014-02-19 12:53:04 -08:00
Chad Brubaker
71e8953171 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
2014-02-19 11:04:49 -08:00
Chad Brubaker
74d117f048 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
2014-02-13 18:19:43 -08:00
Dianne Hackborn
19cb7dc0b1 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
2014-02-13 17:55:40 +00:00
Jake Hamby
4deacc2420 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
2014-02-03 15:52:18 -08:00
Hui Lu
451691e2d2 am 3cab7fc1: Merge "Add proxy as another network." into klp-modular-dev
* commit '3cab7fc1b8f06166df3a58cf10d4a0db36bde788':
  Add proxy as another network.
2014-01-31 08:11:57 +00:00
Hui Lu
865b70dfcf Add proxy as another network.
Change-Id: I70cb6ac5604c4f0d6a752a291c40de2445ae98bb
2014-01-30 17:26:18 -05:00
Robert Greenwalt
f7ec405b4d Clean up dhcp no-op logging
bug:10553167
Change-Id: I1f6feb9a44e17d45ffc9f28b37bf5690230a3ade
2014-01-23 16:05:25 -08:00
Amith Yamasani
7fe7106ce2 am 5215517c: Move some system services to separate directories
* commit '5215517c3acad4f6ae3bdb56d268b4f23aa83022':
  Move some system services to separate directories
2013-12-19 23:30:35 +00:00
Amith Yamasani
5215517c3a 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
2013-12-19 15:25:37 -08:00
Lorenzo Colitti
86c4687a66 am 263c4788: am 4d60936e: am 24a32d08: Merge "Add address flags and scope to LinkAddress."
* commit '263c4788dcf45f104f8668fd6621d1a7c39689b9':
  Add address flags and scope to LinkAddress.
2013-12-09 18:34:44 +00:00
Lorenzo Colitti
4d60936e5f am 24a32d08: Merge "Add address flags and scope to LinkAddress."
* commit '24a32d083fe094914f9fd5105cb45559f90c162c':
  Add address flags and scope to LinkAddress.
2013-12-09 10:28:19 -08:00
Lorenzo Colitti
24a32d083f Merge "Add address flags and scope to LinkAddress." 2013-12-07 02:43:04 +00:00
Lorenzo Colitti
61b6582970 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
2013-12-06 13:54:35 +09:00
The Android Open Source Project
2f51fe8556 am dcff5cef: am b8ec69f8: am 943ac81d: Merge commit \'bac61807d3bcfff957b358cb9ad77850bd373689\' into HEAD
* commit 'dcff5ceff6ef0050af4c49a8c2a86ab663a88665':
2013-12-06 02:50:46 +00:00
The Android Open Source Project
b8ec69f8b6 am 943ac81d: Merge commit \'bac61807d3bcfff957b358cb9ad77850bd373689\' into HEAD
* commit '943ac81ddff571f74e1ee9c8d184a56187dc4a60':
2013-12-05 17:27:10 -08:00
The Android Open Source Project
943ac81ddf Merge commit 'bac61807d3bcfff957b358cb9ad77850bd373689' into HEAD
Change-Id: I29374270c8e0c2f2859efaf1d55af9f73da0f8d7
2013-12-05 13:10:46 -08:00
Lorenzo Colitti
839363d0ad am 13d9dfb4: am 7dcabe75: am 5a7c768e: Merge "Minor changes to LinkAddress."
* commit '13d9dfb495db1431623c712b36cac1fe2f3c2fc0':
  Minor changes to LinkAddress.
2013-12-04 01:35:11 +00:00
Lorenzo Colitti
7dcabe75aa am 5a7c768e: Merge "Minor changes to LinkAddress."
* commit '5a7c768e799f1af16643a4941353219abace2b56':
  Minor changes to LinkAddress.
2013-12-03 17:26:06 -08:00
Lorenzo Colitti
5a7c768e79 Merge "Minor changes to LinkAddress." 2013-12-04 01:21:07 +00:00
Lorenzo Colitti
ee3f442711 Minor changes to LinkAddress.
1. Simplify the parceling code. Since the InetAddress inside a
   LinkAddress can never be null, we don't need to special-case
   the case where it is.
2. Add / update method documentation.
3. Write a unit test.

Change-Id: Iba0a8cecc683d55d736419965e72ee33dd66dc22
2013-12-03 19:46:36 +09:00
Lorenzo Colitti
ea8e10ed5d am 9aee0278: am f226bc60: Merge "Use LinkAddress in address notifications."
* commit '9aee0278a7c39255b234a6e8d8e2c3b8982657ad':
  Use LinkAddress in address notifications.
2013-12-02 20:53:06 +00:00
Lorenzo Colitti
9aee0278a7 am f226bc60: Merge "Use LinkAddress in address notifications."
* commit 'f226bc606af9ce5aceff6b05fc4b0200c94cb248':
  Use LinkAddress in address notifications.
2013-11-26 17:56:45 -08:00
Lorenzo Colitti
8fbb60fba5 am f585ba87: am 9d4ac970: Merge "Pass DNS server info notifications to observers."
* commit 'f585ba8798ccff03fcf556d0fdc8b2b2fd3b4b28':
  Pass DNS server info notifications to observers.
2013-11-26 08:48:34 -08:00
Lorenzo Colitti
f174107ace am 182867aa: am eede7e89: Merge "Minor cleanups to NetdCallbackReceiver.onEvent."
* commit '182867aa90191ba4f2a46eccbe2e3ebbf81006ab':
  Minor cleanups to NetdCallbackReceiver.onEvent.
2013-11-26 08:48:30 -08:00
Lorenzo Colitti
f585ba8798 am 9d4ac970: Merge "Pass DNS server info notifications to observers."
* commit '9d4ac9703657142b190d3c256de7c3329e5a4b29':
  Pass DNS server info notifications to observers.
2013-11-26 08:38:48 -08:00
Lorenzo Colitti
182867aa90 am eede7e89: Merge "Minor cleanups to NetdCallbackReceiver.onEvent."
* commit 'eede7e89c94b3bb56c26aec137c53d592d3bc7c3':
  Minor cleanups to NetdCallbackReceiver.onEvent.
2013-11-26 08:38:45 -08:00
Lorenzo Colitti
eb91fd778c Use LinkAddress in address notifications.
Currently address{Updated,Removed} pass in the address as a
string such as "fe80::1/64". Use LinkAddresses instead, since
that's what it is.

This makes the code more robust in the unlikely case that netd
passes in an invalid string. In the future we can move flags and
scope into the LinkAddress itself and simplify the code further.

Bug: 9180552
Change-Id: I66599f9529cf421caa7676fdd0141bb110b8589e
2013-11-26 21:55:15 +09:00
Lorenzo Colitti
7d0a830d80 Pass DNS server info notifications to observers.
These are sent if the device receives IPv6 Router Advertisements
with DNS server configuration options. Currently, nothing listens
to them; in a future change we will use them as IPv6 DNS servers.

[Cherry-pick of af70f6c614]

Bug: 9180552
Change-Id: I05000c0cd3867a68ab390102e8470b6912a9d3aa
2013-11-25 17:27:17 +09:00
Lorenzo Colitti
8f8e9983d9 Minor cleanups to NetdCallbackReceiver.onEvent.
- Clean up identical error messages.
- Fix the array length check for InterfaceAddressChange.

[Cherry-pick of 49fa751ec6]

Bug: 9180552
Change-Id: Id871f481445b530c3ad749725f1548df0e3a1228
2013-11-25 17:25:45 +09:00
The Android Open Source Project
92568d5fc3 am 9378455a: am 6e35df34: (-s ours) Merge commit \'b873a17ce7be0a9771c24999adca6964431728f6\' into HEAD
* commit '9378455a49eee61a01cb80817507f32e2d8e618e':
2013-11-22 19:31:23 -08:00
The Android Open Source Project
9378455a49 am 6e35df34: (-s ours) Merge commit \'b873a17ce7be0a9771c24999adca6964431728f6\' into HEAD
* commit '6e35df34c98a5ecb0c17ec8dd1a2bb1b465144cc':
2013-11-22 17:40:32 -08:00
The Android Open Source Project
6e35df34c9 Merge commit 'b873a17ce7be0a9771c24999adca6964431728f6' into HEAD
Change-Id: I938755073e70602cc8f51ce9bd420fdcf870cecd
2013-11-22 11:18:57 -08:00
Lorenzo Colitti
f2169b6369 Merge "Pass DNS server info notifications to observers." 2013-11-22 01:27:15 +00:00