Commit Graph

1099 Commits

Author SHA1 Message Date
Amit Mahajan
c4418f95e4 Handle provisioning APN by turning off/on radio.
The change is specific to AT&T as they want no signaling from device during provisioning.
I've tested following cases:
- expired AT&T SIM to make sure provisioning flow works as expected.
- airplane mode on/off with both active and expired AT&T SIM.
- wifi <-> mobile transitions work okay.
- LTE with Verizon SIM (basic sanity).

bug: 13190133

Change-Id: I215963174ae6000ae71d1dda693f95413f3d6e81
2014-06-09 17:55:27 +00:00
Robert Greenwalt
eddae63ab2 am 9932c297: (-s ours) am f9e24b30: am b0f4f4d7: am 2cc9ee1c: (-s ours) am 2c90609c: am 339cfdbd: am 72f9b308: am 7d574493: am 1600a26e: am 7f6d1ef7: am 8eac056f: DO NOT MERGE Sanitize WifiConfigs
* commit '9932c29766d5cea833f2b4cab2f72c782cead0b2':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 20:34:49 +00:00
Robert Greenwalt
9932c29766 am f9e24b30: am b0f4f4d7: am 2cc9ee1c: (-s ours) am 2c90609c: am 339cfdbd: am 72f9b308: am 7d574493: am 1600a26e: am 7f6d1ef7: am 8eac056f: DO NOT MERGE Sanitize WifiConfigs
* commit 'f9e24b3065a0001ce826a101ce73eacac1aad743':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 20:27:50 +00:00
Robert Greenwalt
e630a07387 am 4342c3d6: (-s ours) am 8f2cf6a9: am 39e9ece0: am b3efa6a3: (-s ours) am 106627e0: am e42ce676: am ebf23a8d: am 8a1be0be: am 3c417fbf: Merge "DO NOT MERGE Sanitize WifiConfigs" into jb-mr1-dev
* commit '4342c3d6b2f745aec10c213a2107b877cf464f94':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 20:26:35 +00:00
Robert Greenwalt
f9e24b3065 am b0f4f4d7: am 2cc9ee1c: (-s ours) am 2c90609c: am 339cfdbd: am 72f9b308: am 7d574493: am 1600a26e: am 7f6d1ef7: am 8eac056f: DO NOT MERGE Sanitize WifiConfigs
* commit 'b0f4f4d76ac299bf313500288d26f07979e8c77e':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 20:21:52 +00:00
Robert Greenwalt
4342c3d6b2 am 8f2cf6a9: am 39e9ece0: am b3efa6a3: (-s ours) am 106627e0: am e42ce676: am ebf23a8d: am 8a1be0be: am 3c417fbf: Merge "DO NOT MERGE Sanitize WifiConfigs" into jb-mr1-dev
* commit '8f2cf6a980e629080e5ea196c1e7a07754abb3cf':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 20:18:41 +00:00
Robert Greenwalt
b0f4f4d76a am 2cc9ee1c: (-s ours) am 2c90609c: am 339cfdbd: am 72f9b308: am 7d574493: am 1600a26e: am 7f6d1ef7: am 8eac056f: DO NOT MERGE Sanitize WifiConfigs
* commit '2cc9ee1c6fd302ef34045f8f2c8f812222ce7807':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 20:16:15 +00:00
Robert Greenwalt
8f2cf6a980 am 39e9ece0: am b3efa6a3: (-s ours) am 106627e0: am e42ce676: am ebf23a8d: am 8a1be0be: am 3c417fbf: Merge "DO NOT MERGE Sanitize WifiConfigs" into jb-mr1-dev
* commit '39e9ece04502e57f30e6814a01e6673d2a4216a5':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 20:12:56 +00:00
Robert Greenwalt
2cc9ee1c6f am 2c90609c: am 339cfdbd: am 72f9b308: am 7d574493: am 1600a26e: am 7f6d1ef7: am 8eac056f: DO NOT MERGE Sanitize WifiConfigs
* commit '2c90609c0bddb6fbe255e5632a1e6639e760290f':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 20:09:33 +00:00
Robert Greenwalt
39e9ece045 am b3efa6a3: (-s ours) am 106627e0: am e42ce676: am ebf23a8d: am 8a1be0be: am 3c417fbf: Merge "DO NOT MERGE Sanitize WifiConfigs" into jb-mr1-dev
* commit 'b3efa6a38bbc5109db605ec62ebffa820ba402ce':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 20:07:10 +00:00
Robert Greenwalt
b3efa6a38b am 106627e0: am e42ce676: am ebf23a8d: am 8a1be0be: am 3c417fbf: Merge "DO NOT MERGE Sanitize WifiConfigs" into jb-mr1-dev
* commit '106627e07cecfa8a9bcc43578fde78652fc59eba':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 20:00:33 +00:00
Robert Greenwalt
7d57449337 am 1600a26e: am 7f6d1ef7: am 8eac056f: DO NOT MERGE Sanitize WifiConfigs
* commit '1600a26e64e8ade9a67418ca1792c6100a99d15f':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 19:47:49 +00:00
Robert Greenwalt
1600a26e64 am 7f6d1ef7: am 8eac056f: DO NOT MERGE Sanitize WifiConfigs
* commit '7f6d1ef7d85327c80f9539cc17895fe61cba2016':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 19:42:49 +00:00
Robert Greenwalt
7f6d1ef7d8 am 8eac056f: DO NOT MERGE Sanitize WifiConfigs
* commit '8eac056f75f09ecdbc2fe550b6e05c8d6fd30398':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 19:36:54 +00:00
Robert Greenwalt
8a1be0be1f am 3c417fbf: Merge "DO NOT MERGE Sanitize WifiConfigs" into jb-mr1-dev
* commit '3c417fbf21133340cbbe3539d87c453f81ae3a9d':
  DO NOT MERGE Sanitize WifiConfigs
2014-04-07 19:36:44 +00:00
Robert Greenwalt
d4f7652c27 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: I80912cc08ffa1e4b63008c94630006cf316e7a64
2014-03-28 14:54:53 -07:00
Robert Greenwalt
8eac056f75 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: I98c0672a6d9c8d5bc4f160849aa0fa182073216b
2014-03-28 11:38:33 -07:00
Chad Brubaker
e6d1fa7aeb Merge "Include the interface for clearDnsInterfaceForUidRange" into klp-dev 2014-03-21 20:52:05 +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
1a1703f929 Merge "ConnectivityService: add support to set TCP initial rwnd" into klp-dev 2014-03-13 20:33:44 +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
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
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
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
Robert Greenwalt
5654cd271f Fix NPE in ConnectivityService
bug:11727708
Change-Id: Ia8ca9d1e23f021feaf4b772ec38d1d0e89b0cd2a
2013-11-18 09:43:59 -08: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
Wink Saville
4df83f5734 Use HttpsURLConnection to by pass proxies.
In isMobileOk attempting to connect to clients3.google.com/generate_204 we
sometimes see a proxy server will not let the connection go to our
server and instead returns 200 instead of 204. By using Https we by pass
proxy servers and we will always connected to our server.

The number of loops is increased from 3 to 4 and half the the retires
will use Http and half will use Https.

I also, added mTestingFailures which can be set to true by setting
persist.checkmp.testfailures to 1. This will cause checkMobileProvisiong
to always fail so we can test https & http.

Bug: 9972012
Change-Id: I870606037dcffe5250843980517ac52218266e02
2013-10-31 06:35:22 -07:00
Robert Greenwalt
a03ea4847b Merge "Change how we use provisioning url so post works" into klp-dev 2013-10-17 23:00:42 +00:00
Robert Greenwalt
411dcf66c4 Change how we use provisioning url so post works
Needed to do an http post instead of a get for one carrier.
Do this by putting an auto-submitting form in the data to be
interpreted as a html doc by the browser.  The ACTION_VIEW
intent only works on http uri, but by specifying ACTION_MAIN/
CATEGORY_APP_BROWSER we could use data:text/html.

bug:11168810
Change-Id: Ifd33e1c3c7f9f40b6add39e446e6a7d7cde22549
2013-10-17 12:46:52 -07:00
The Android Automerger
df23a9b6ea merge in klp-release history after reset to klp-dev 2013-10-15 21:14:08 -07:00
Robert Greenwalt
af2f34adfd Retry captiveportal check even if only one addr
We're getting some false positive results on this check and
while it was coded to try 3 times given sufficient independent addrs
the default url resolves to a single address so we'd just try once.

Rework to try again even with fewer urls to try to reduce the false
positives.

Also adds a random query param to fool proxies into not caching.

bug:9972012
Change-Id: Ib719f40ec612065ca6bcd919549fc1164506d35a
2013-10-15 12:43:30 -07:00
The Android Automerger
0ee9847649 merge in klp-release history after reset to klp-dev 2013-10-13 06:01:56 -07:00
Jason Monk
a69f1b06de getProxy in ConnectivityService returns port w/PAC
Changes the PacManager to report message back to ConnectivityService
to send a broadcast once the download has completed.  This allows the
ConnectivityService to store the correct proxy info for getProxy().

This made the problem arise that ProxyProperties was not handling port
while it had PAC.  Added small fix for equals() and parcelization.

The combination of these fixes seems to resolve Bug: 11028616.

Bug: 11168706
Change-Id: I92d1343a8e804391ab77596b8167a2ef8d76b378
2013-10-10 17:01:45 -04:00
Dianne Hackborn
75d9bcddea Fix issue #11113111: dumpsys activity service is broken
Change-Id: Ie02d27b377c562085ef7eb5dea144ce2f382c11d
2013-10-09 14:34:04 -07:00
The Android Automerger
254232b727 merge in klp-release history after reset to klp-dev 2013-10-09 06:01:14 -07:00
Lorenzo Colitti
cabdbf9fec Merge "Fix captive portal detection on IPv6 networks." into klp-dev 2013-10-09 02:14:43 +00:00
Ed Heyl
e83f730778 merge in KQS81M 2013-10-08 15:40:08 -07:00
Lorenzo Colitti
9405beeea0 Fix captive portal detection on IPv6 networks.
Currently the captive portal check URL is generated by
concatenating scheme, "://", IP address, and port. This breaks
for IPv6 because IPv6 addresses in URLs must be enclosed in
square brackets (e.g., http://2001:db8::1/generate_204 is
invalid; should he http://[2001:db8::1]/generate_204 instead).
The resulting MalformedURLException causes isMobileOk to report
that there is no captive portal, even if there is one.

Fortunately the three-arg URL constructor already knows how to
construct URLs with IPv6 addresses. Use that instead of
generating the URL ourselves.

Bug: 10801896
Change-Id: I02605ef62f493a34f25bb405ef02b111543a76fd
2013-10-08 14:15:14 +09:00
The Android Automerger
bc0a421e8e merge in klp-release history after reset to klp-dev 2013-10-07 06:00:38 -07:00
Robert Greenwalt
b1b99f6765 am 4f15276a: (-s ours) am ff23ab37: am 88a69fc2: DO NOT MERGE Un-deprecate getDhcpInfo
* commit '4f15276a26f8f11636888e6e10d2577472d4505e':
  DO NOT MERGE Un-deprecate getDhcpInfo
2013-10-06 17:11:00 -07:00
Robert Greenwalt
94475b9ffb am fea09d86: (-s ours) am 0f1ac468: am f725b93f: (-s ours) DO NOT MERGE Un-deprecate getDhcpInfo
* commit 'fea09d861190b9c115cbb2518e1d9c465eb2256e':
  DO NOT MERGE Un-deprecate getDhcpInfo
2013-10-06 17:10:57 -07:00
Robert Greenwalt
4f15276a26 am ff23ab37: am 88a69fc2: DO NOT MERGE Un-deprecate getDhcpInfo
* commit 'ff23ab37b9d2318477247e87d288faad9d15e002':
  DO NOT MERGE Un-deprecate getDhcpInfo
2013-10-06 17:03:59 -07:00
Robert Greenwalt
fea09d8611 am 0f1ac468: am f725b93f: (-s ours) DO NOT MERGE Un-deprecate getDhcpInfo
* commit '0f1ac4682b0719b2cc900ea41a86a1c55ff50a75':
  DO NOT MERGE Un-deprecate getDhcpInfo
2013-10-06 17:03:56 -07:00