Commit Graph

1154 Commits

Author SHA1 Message Date
Chad Brubaker
ba1a9a6132 am 1fce89d9: am e6d1fa7a: Merge "Include the interface for clearDnsInterfaceForUidRange" into klp-dev
* commit '1fce89d946760a1bcf3a733f55494f963eab00c2':
  Include the interface for clearDnsInterfaceForUidRange
2014-03-21 21:02:43 +00:00
Chad Brubaker
e6d1fa7aeb Merge "Include the interface for clearDnsInterfaceForUidRange" into klp-dev 2014-03-21 20:52:05 +00:00
Robert Greenwalt
98bb98bdd0 am bd84f01c: am 22e0dfc4: Merge "Handle provisioning APN by turning off/on data." into klp-dev
* commit 'bd84f01c6ce122ab58fc7c5b687dc8bfb0fb03e6':
  Handle provisioning APN by turning off/on data.
2014-03-19 19:08:44 +00:00
Robert Greenwalt
22e0dfc465 Merge "Handle provisioning APN by turning off/on data." into klp-dev 2014-03-19 16:12:01 +00:00
Wink Saville
98fee2c93b Handle provisioning APN by turning off/on data.
This is a start and two tests succeed:

Tested expired AT&T SIM and waiting 15min for alarm to fire.
Tested a provisioned Verizon SIM and works normally.

I've NOT tested AT&T where I've properly completed the provisioning.
I've NOT tested T-Mobile SIM either provisioned or not-provisioned.
I've NOT tested provisioning over WiFi.
I've NOT tested that WiFi <-> Mobile works
I've NOT tested voice calls, SMS, MMS
...

The current bug is below, but it is poorly named either it should be
renamed or a new bug created.

Bug: 13190133
Change-Id: I0a09f642614cd27a8655e9dae764b8999ce485b8
2014-03-18 10:58:40 -07:00
Chad Brubaker
11ca0a104d Include the interface for clearDnsInterfaceForUidRange
With netd allowing overlapping rules for uid range rules the interface
name is needed to make sure only the correct rule is removed.

Bug: 12134439
Change-Id: I94f77f154f49ca8d5f6cf49683a4473cc92c3eb7
2014-03-15 15:31:47 -07:00
JP Abgrall
36b41e20e0 am 4ecd833e: am 1a1703f9: Merge "ConnectivityService: add support to set TCP initial rwnd" into klp-dev
* commit '4ecd833ee35d1120f8c1ae52367947cacfc263a4':
  ConnectivityService: add support to set TCP initial rwnd
2014-03-14 16:28:09 +00:00
Chad Brubaker
7e3104d46d am 78f204ae: am 8e240af5: Merge "Remove SO_BINDTODEVICE from VPN protect" into klp-dev
* commit '78f204aed8c0f3c8174616801d66f96a9a00a5fd':
  Remove SO_BINDTODEVICE from VPN protect
2014-03-14 16:27:58 +00:00
JP Abgrall
1a1703f929 Merge "ConnectivityService: add support to set TCP initial rwnd" into klp-dev 2014-03-13 20:33:44 +00:00
Chad Brubaker
51e6a21fc0 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
2014-03-13 18:18:40 +00:00
Chad Brubaker
7226f99898 am 1011960c: am decfd707: Merge "Add the calling package name to requestRouteToHost" into klp-dev
* commit '1011960c44a4f84d53d05199fe1ca09be9473822':
  Add the calling package name to requestRouteToHost
2014-03-13 18:18:36 +00:00
JP Abgrall
af3781c983 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-03-12 20:22:47 -07:00
Chad Brubaker
41236f1dff 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-03-11 10:58:19 -07:00
Robert Greenwalt
8f809883c7 am 89ba783f: am bad3a9e6: am 2d1e8c49: Merge "Only apply tcp buffer sizes for default net" into klp-dev
* commit '89ba783fdcfaf87a76682033b294325e461f95f4':
  Only apply tcp buffer sizes for default net
2014-03-05 22:14:46 +00:00
Chad Brubaker
342cd4d214 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-03-05 13:35:36 -08:00
Chad Brubaker
edf0ac7298 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-03-05 13:35:20 -08:00
Robert Greenwalt
89ba783fdc 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
2014-03-05 18:31:18 +00:00
Robert Greenwalt
eace8d5669 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
2014-03-04 09:56:05 -08: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
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
Hui Lu
865b70dfcf Add proxy as another network.
Change-Id: I70cb6ac5604c4f0d6a752a291c40de2445ae98bb
2014-01-30 17:26:18 -05: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
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
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
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
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
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
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
Robert Greenwalt
3863b8a1e7 am a8a448da: am e568672c: Merge "Fix NPE in ConnectivityService" into klp-dev
* commit 'a8a448da25c62f54cac3318c17c69e851a4ecde9':
  Fix NPE in ConnectivityService
2013-11-18 10:33:46 -08:00
Robert Greenwalt
5654cd271f Fix NPE in ConnectivityService
bug:11727708
Change-Id: Ia8ca9d1e23f021feaf4b772ec38d1d0e89b0cd2a
2013-11-18 09:43:59 -08:00
Robert Greenwalt
20a290e8ac resolved conflicts for merge of 94a718f8 to klp-dev-plus-aosp
Change-Id: I220a034cf3293a4a29d8683f20812adac112bddd
2013-11-13 17:50:35 -08:00
Robert Greenwalt
61efbf7f38 am 4c514f2a: am 594eeb08: Merge "Fix for the invalid Global Proxy Setting" into klp-dev
* commit '4c514f2a688bdae319c919987092ccfee690f390':
  Fix for the invalid Global Proxy Setting
2013-11-13 16:29:12 -08:00
Robert Greenwalt
94a718f80b am a3c50d75: Merge "Fix for the invalid Global Proxy Setting"
* commit 'a3c50d75ace37eb07c3fe9dc7756a9c56a4922ff':
  Fix for the invalid Global Proxy Setting
2013-11-13 16:27:56 -08:00
Robert Greenwalt
a3c50d75ac Merge "Fix for the invalid Global Proxy Setting" 2013-11-14 00:23:04 +00:00
Raj Mamadgi
f3df16221a Fix for the invalid Global Proxy Setting
Adding validation for Global Proxy setting before it is
being set.

Proxy is validated at the boot time also to make sure
the value set is valid.

Signed-off-by: Raj Mamadgi <rmamadgi@sta.samsung.com>
bug:11598568

Change-Id: Idff5ae81119d8143da096b5291ecbfbc5875cbd4
2013-11-14 00:08:21 +00:00
Robert Greenwalt
788baf6d24 am 86250cc5: am 18490abd: Merge "Fix NPE in ConnectivityService"
* commit '86250cc52873602f0dc1d9646cbd68097bd510a1':
  Fix NPE in ConnectivityService
2013-11-13 10:27:46 -08:00