summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/connectivity
Commit message (Collapse)AuthorAgeFilesLines
* Monitor the right interface re VPNRobert Greenwalt2012-10-121-1/+7
| | | | | | | | Must remember the outer interface - undoes a change from a couple months ago that broke things. bug:7336302 Change-Id: Ia4f60862c60f3078853e151980e09cbf22a57222
* Properly cancel Tether notification.Robert Greenwalt2012-10-041-1/+2
| | | | | | | | | | When we add a second type of tethering we unify the notifications into a single generic type. This is done by canceling the first and replacing it, but this flow was improperly canceling, so you could end up with orphaned tethering icons. bug:7283605 Change-Id: I1d136f51592b4326d48578cf67b69122e45d4984
* Update references to migrated global settings.Jeff Brown2012-09-251-2/+2
| | | | | | | | | | Fixed one setting that was migrated but not marked deprecated. Removed a hidden setting that is no longer used by the new power manager service. Bug: 7231172 Change-Id: I332f020f876a18d519a1a20598a172f1c98036f7
* Fix issue #7214090: Need to be able to post notifications to all usersDianne Hackborn2012-09-242-5/+9
| | | | | | | | | | | | | | | Also fix a bunch of system services that should be doing this. And while doing that, found I needed to fix PendingIntent to evaluate USER_CURRENT at the point of sending, not creation. Note that this may end up with us having some notification shown to non-primary users that lead to settings UI that should only be for the primary user (such as the vpn notification). I'm not sure what to do about this, maybe we need a different UI to come up there or something, but showing the actual notification for those users at least seems less broken than not telling them at all. Change-Id: Iffc51e2d7c847e3d05064d292ab93937646a1ab7
* Improve multi-user broadcasts.Dianne Hackborn2012-08-301-1/+2
| | | | | | | | | | | | | | | | | | | You can now use ALL and CURRENT when sending broadcasts, to specify where the broadcast goes. Sticky broadcasts are now correctly separated per user, and registered receivers are filtered based on the requested target user. New Context APIs for more kinds of sending broadcasts as users. Updating a bunch of system code that sends broadcasts to explicitly specify which user the broadcast goes to. Made a single version of the code for interpreting the requested target user ID that all entries to activity manager (start activity, send broadcast, start service) use. Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
* Always-on VPN.Jeff Sharkey2012-08-271-0/+15
| | | | | | | | | | | | | | | | | | | Adds support for always-on VPN profiles, also called "lockdown." When enabled, LockdownVpnTracker manages the netd firewall to prevent unencrypted traffic from leaving the device. It creates narrow rules to only allow traffic to the selected VPN server. When an egress network becomes available, LockdownVpnTracker will try bringing up the VPN connection, and will reconnect if disconnected. ConnectivityService augments any NetworkInfo based on the lockdown VPN status to help apps wait until the VPN is connected. This feature requires that VPN profiles use an IP address for both VPN server and DNS. It also blocks non-default APN access when enabled. Waits for USER_PRESENT after boot to check KeyStore status. Bug: 5756357 Change-Id: If615f206b1634000d78a8350a17e88bfcac8e0d0
* Migrate legacy VPN arguments to system_server.Jeff Sharkey2012-08-241-10/+125
| | | | | | | | Generate the racoon and mtpd daemon arguments in system_server, instead of accepting them from Settings. Bug: 5756357 Change-Id: I42c1a644f6add477fe4222342640d7db15982cb8
* Begin moving VPN to NetworkStateTracker pattern.Jeff Sharkey2012-08-231-89/+191
| | | | | | | | | | | | Created base tracker that handles common bookkeeping, and move VPN to become a tracker. VPN status is now reflected in NetworkInfo, and is mapped to LegacyVpnInfo. Legacy VPN now "babysits" any init services it starts, watching for when they stop unexpectedly. Bug: 5756357 Change-Id: Iba7ec79da69469f6bd9a970cc39cf6b885b4c9c4
* Cleaner controls between Vpn and init services.Jeff Sharkey2012-08-061-10/+6
| | | | Change-Id: I35edf054f4a1190f7fb7b4c48ee832e899c9528b
* Make LocalSocket Closeable.Jeff Sharkey2012-08-051-10/+4
| | | | | | Enables usage of IoUtils.closeQuietly(). Change-Id: I91126297c1f235ae9da09f82d8f4f22db46558eb
* Network data activity change intent for network interfaces.Haoyu Bai2012-07-172-0/+5
| | | | | | | | The activity notification is received from netd, an intent DATA_ACTIVITY_CHANGE is then raised for other part of the system to consume. Change-Id: Idfcc4763c51c5b314c57f546c12557082f06bebf
* Merge commit '1b003ef0' into mitWink Saville2012-07-111-4/+5
|\ | | | | | | | | | | | | * commit '1b003ef0': Create telephony-common and mms-common Change-Id: Ie8876541dbe7f4c933cf7d69910dd204538bc975
| * Create telephony-common and mms-commonWink Saville2012-07-111-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These have been created to reduce the size and complexity of frameworks/base. mms-common was created by moving all of frameworks/base/core/java/com/google/android/mms to: frameworks/opt/mms telephony-common was created by moving some of frameworks/base/telephony to: frameworks/opt/telephony Change-Id: If6cb3c6ff952767fc10210f923dc0e4b343cd4ad
* | Make tethering ignore bad inputsRobert Greenwalt2012-06-141-2/+7
| | | | | | | | | | | | | | | | | | | | Tethering was re-evaluating everything on any connectivity change. This was causing problems when mobile data was not available as each re-eval was again requesting a connection which would fail and loop. Ignore FAILED states to break this cycle in a minimal change. bug:6668233 Change-Id: Ia1dfc6abff1fe464e9501b50185cdb8d0fbb7ff6
* | am a2becffc: am d667aebf: Merge "VPN: move VpnDialogs away from system uid." ↵Chia-chi Yeh2012-06-121-8/+26
|\ \ | |/ | | | | | | | | | | into jb-dev * commit 'a2becffcf2a19889b90256a8479e276081ce6108': VPN: move VpnDialogs away from system uid.
| * VPN: move VpnDialogs away from system uid.Chia-chi Yeh2012-06-081-8/+26
| | | | | | | | | | Bug: 6632536 Change-Id: Iece647c077caf5298ccfe7d7aba5f0911a4ed0d1
* | Add logging for Tethering.Robert Greenwalt2012-05-111-7/+17
|/ | | | | | | Hard to repro bug doesn't have enough info in the logs to understand. bug:6469121 Change-Id: I31734f4e891e9b23197f2d5adb931e3891393cdd
* Don't forget to turn off mobile_dunRobert Greenwalt2012-02-291-0/+10
| | | | | | | | When we find a higher priority match for tethering traffic we should turn off whatever we were trying before. bug:6083611 Change-Id: I06ee41336df107353bf1a979150345e461574a48
* am 1e9e7f76: am ff321d49: Merge "VPN: silence VPN notifications." into ics-mr1Chia-chi Yeh2012-01-121-1/+1
|\ | | | | | | | | * commit '1e9e7f76d5e6187befaf96eece258c27fd08bdc5': VPN: silence VPN notifications.
| * VPN: silence VPN notifications.Chia-chi Yeh2012-01-111-1/+1
| | | | | | | | | | Bug: 5852859 Change-Id: I269d8de298a1fd69a8d777150ae97927537a5424
* | Merge "Filter our v6 address from tethering dns."Robert Greenwalt2012-01-051-2/+14
|\ \
| * | Filter our v6 address from tethering dns.Robert Greenwalt2011-12-201-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | Don't support IPv6 yet, and the tools crash when they see one, so filter them out. bug:5763980 Change-Id: Ie9a4445a3c72df3f7ab4320c507ebc8e8cd440ff
* | | VPN: fix a CloseGuard warning.Chia-chi Yeh2011-12-271-6/+2
|/ / | | | | | | Change-Id: Ic237a33038be9a170c1f9128332a8743c57971ed
* | Merge "Use the carrier-given dns addrs for tethering."Robert Greenwalt2011-12-121-6/+18
|\ \
| * | Use the carrier-given dns addrs for tethering.Robert Greenwalt2011-12-091-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a complaint from carriers (that we used 8.8.8.8), but also fixes the case where there is only room for one live radio connection: the secondary connection (tethering) doesn't have a default route to prevent on-device traffic from slipping out on the tethering connection, but tethered dns is proxied through dnsmasq, so it is appearing as on-device traffic and is unroutable. By switching to the carrier-indicated dns servers we can use the host-routes already set for those and kill two bugs with one fix. bug:5525764 bug:3045311 Change-Id: Ib1ccea81e0c0ed2d1462dc9721c2647124a790da
* | | am fa71962f: am 46a4e81d: Merge "VPN: delete the "abort" file before ↵Chia-chi Yeh2011-12-121-0/+1
|\ \ \ | |/ / |/| / | |/ | | | | | | starting VPN daemons." into ics-mr1 * commit 'fa71962fe4595f484071ac0deb23f68d44932d83': VPN: delete the "abort" file before starting VPN daemons.
| * VPN: delete the "abort" file before starting VPN daemons.Chia-chi Yeh2011-12-081-0/+1
| | | | | | | | | | Bug: 5714296 Change-Id: Idba41b9f3907747a84387ea4f3e930b3a185a06e
* | Clean up InterfaceConfiguration flags.Jeff Sharkey2011-11-291-5/+4
|/ | | | | | | Offer modifier methods for interface flags instead of mutating directly, and remove square brackets. Change-Id: I4cce719dccedfb3f0e8448c111e65b93c0008cbb
* Tone down Tethering logs.Robert Greenwalt2011-11-111-12/+11
| | | | | bug:5601582 Change-Id: I66c0a5a06a2c13a7cf93ea264d156b37df23745f
* Make upstream tether list threadsafeRobert Greenwalt2011-11-071-131/+172
| | | | | | | | Outsiders asking for this list may cause the list to change on another thread. Fixing general synchronization issues. bug:5531630 Change-Id: I7a3ee0bba3db40f45bcb0159491942fa4cf38c37
* Start using IP tool for advanced routing.Robert Greenwalt2011-11-041-14/+10
| | | | | | bug:5495862 bug:5396842 Change-Id: I5e31b352b14a4dc746cacce4d61cf8d9ad7382a0
* Ignore errors when untetheringRobert Greenwalt2011-11-021-52/+27
| | | | | | | | | Sometimes the interface is removed before we can untether leading to errors when cleanup up various rules (iptables). Do as much as we can and then let a re-tether result in error if needed. bug:5536516 Change-Id: Ib1d064ecc8e9022566f9b0e4678b33144906971c
* Fix Tethering settings.Robert Greenwalt2011-10-211-16/+42
| | | | | | | | | | | | Two issues. A mcc/mnc-driven overlay means that the config at boot may not be the config we wish to use - the sim card is read later which may switch the config. Changed to read the configuration each time rather than once at boot. Second, the secure-setting override was always trumping the resource config as we weren't discriminating between a not-set default and a real setting. This meant the config could never make DUN-required. bug:5495862 Change-Id: Icd4e90ac1d32bbb704c0ff9cc69e954fb0a0b58c
* Watch network subtype, tethering teardown, empty.Jeff Sharkey2011-09-221-2/+15
| | | | | | | | | | | | | Watch for changes to telephony network subtype, and update iface mapping to persist stats under correct type. Update network stats before removing tethering NAT rules. Skip recording that would create empty historical buckets. Query UID stats before iface stats to always skew positive when counters are actively rolling forward. Bug: 5360042, 5359860, 5335674, 5334448 Change-Id: I8aa37b568e8ffb70647218aa1aff5195d3e44d5a
* Reduce connectivity loggingWink Saville2011-09-211-31/+32
| | | | Change-Id: I5d45b8fbcd01e42df7f2b1cf02fb5b226128abb8
* Collect and persist tethering stats.Jeff Sharkey2011-09-161-5/+16
| | | | | | | | | Use new "gettetherstats" netd command to retrieve statistics for active tethering connections. Keep tethering poll events separate from UID poll, even though they end up same historical structures. Bug: 5244846 Change-Id: Ia0c5165f6712c12b51586f86c331a2aad4ad6afb
* VPN: stop daemons by closing the control sockets.Chia-chi Yeh2011-08-221-17/+25
| | | | | | | | As init now uses SIGKILL to stop daemons, performing graceful shutdown becomes impossible. Here we implement our own solution by asking daemons to monitor the control socket and terminate when it is closed. Change-Id: I07a28807173a81b7f95e70f4193e974317acf88a
* VPN: reset legacy VPN when resetting IPv4 addresses.Chia-chi Yeh2011-08-161-1/+3
| | | | | | | | | | | | Currently legacy VPN only works on IPv4, and it should always turn down when the addresses are changed. It assumed that the interface will be brought down and up, so the event can be detected via interfaceStatusChanged(). However, the assumption was incorrect and the event is actually driver-dependent. To fix this issue, ConnectivityService now tells VPN that the interface is down when resetting IPv4 addresses. Change-Id: I76d15e56552d86635c5b274ca980be5da905a6fb
* VPN: introduce VpnService as the base class for user space VPN.Chia-chi Yeh2011-08-081-5/+54
| | | | Change-Id: I4793a6eb51b33f669fc6d39e1a16cf5eb9e3d851
* VPN: move away from the VPN permission.Chia-chi Yeh2011-08-031-44/+42
| | | | | | VpnBuilder will be replaced by VpnService in the next change. Change-Id: I2dea67a1616b74d17b372f7b214d207f1617198e
* Clear the bitmap from the canvas in a lot of places.Dianne Hackborn2011-08-021-1/+3
| | | | Change-Id: I6b2071ac7b348c473b9bdd1b972d095aebbb4fb3
* Stop sending tethering broadcasts during boot.Robert Greenwalt2011-07-281-1/+2
| | | | | | | | Well, actually they do go out, but they won't try to start anybody now until after boot. bug:5088272 Change-Id: Iaaf7a1e4b300e0afc3901ecfd225a77084bd0954
* Fix USB tethering againMike Lockwood2011-07-271-1/+8
| | | | | | | | | The kernel sends an interface down event for usb0 when RNDIS is enabled. Ignore this and only remove USB interfaces when we receive the interface removed event. Change-Id: I1458f259b96c9fab4d3a69a5692e630123fad136 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Merge "Handle hostapd and tether interface changes"Irfan Sheriff2011-07-231-0/+2
|\
| * Handle hostapd and tether interface changesIrfan Sheriff2011-07-231-0/+2
| | | | | | | | | | | | | | | | | | The set config will only update hostapd config file right now and we need to restart after that happens. Also, softap interface is changed to be the regular interface Bug: 5069108 Change-Id: Ibe80129b58e5339f06f186870bcd8f37569c6db3
* | Merge "Fix USB tethering"Mike Lockwood2011-07-231-106/+67
|\ \
| * | Fix USB tetheringMike Lockwood2011-07-231-106/+67
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The previous approach no longer works with the new USB drivers, since the usb0 interface is no longer enabled by default. This introduced a chicken & egg problem - usb0 will not be enabled until the user tries to start tethering, but Settings will not enable the checkbox unless usb0 is enabled. To fix this we add an explicit call to start USB tethering in the connectivity manager. This will enable RNDIS if necessary and then bring up tethering once usb0 is enabled. Change-Id: Iae1f733366aa6b0dafa66d4c97207794173ef54b Signed-off-by: Mike Lockwood <lockwood@android.com>
* | VPN: increase timeout period to 60 seconds for legacy VPN.Chia-chi Yeh2011-07-221-1/+1
|/ | | | | | | | | Some VPN needs more time than others in order to create the secure tunnel. For example, L2TP/IPSec PSK on average needs 15 seconds on WiFi. On mobile connection, variation gets larger, and it sometimes needs more than 30 seconds. This change increases timeout period from 30 to 60 seconds. Change-Id: I6006fd254a7bc91c22f63d2f3f20ea79ee9b05e2
* Merge "NetworkManagementService: receive bandwidth controller events"JP Abgrall2011-07-212-0/+4
|\
| * NetworkManagementService: receive bandwidth controller eventsJP Abgrall2011-07-142-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a 1st pass at receiving events that indicate some quota has been reached e.g. warning quota, data collection quota, cutoff quota,... It needs: - new kernel with quota2 logging support - new net:bandwidthcontroller that supports . quota2, . setting alerts. - new NetlinkEvent/NetlinkManager/NetlinkHandler to process NETLINK NFLOG messages. Change-Id: Ibfbb13512c5350cdee0e544ec14caa6f59812409