summaryrefslogtreecommitdiff
path: root/server/TetherController.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * Changes to forwarding for wifi calling.Lorenzo Colitti2015-02-251-39/+59
| | | | | | | | | | | | | | | | | | | | 1. Support multiple forwarding requests. Keep track of all requests inside TetherController, and enable system forwarding any time there is more than one active request. 2. Enable both IPv4 and IPv6 forwarding. Bug: 19500693 Change-Id: Ic81bae7b399bc6ebf6a63de4bcd341885638dfa4
* | Update for libbase.Dan Albert2015-03-141-3/+6
| | | | | | | | | | | | StringPrintf and the string based file I/O are being moved to libbase. Change-Id: I765d9e53f65a76d318d9d0d9503403fc092254d5
* | Switch netd over to <utils/file.h>.Elliott Hughes2015-02-031-21/+6
| | | | | | | | Change-Id: Id79961cc4feee1c307dad06d64e3f4ffe060c4da
* | Avoid leaking file descriptorsNick Kralevich2015-01-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add O_CLOEXEC on open() calls, and SOCK_CLOEXEC on socket calls. This avoids leaking file descriptors across execs. Addresses the following SELinux denial: audit(1422740213.283:8): avc: denied { read write } for pid=2597 comm="clatd" path="socket:[6709]" dev="sockfs" ino=6709 scontext=u:r:clatd:s0 tcontext=u:r:netd:s0 tclass=netlink_socket and allows the removal of some other SELinux rules which were inappropriately added because of leaking file descriptors. Change-Id: I9c180488ea1969d610e488f967a7276a672bb477
* | Plug some leaksJesper Hansson2014-11-241-0/+2
|/ | | | Change-Id: I4268ea32cfb0ebd6ce5711e30865750dffa94e92
* Add a socket mark parameter to tethering DNS commands.Lorenzo Colitti2014-08-271-3/+17
| | | | | | | | This allows the framework to pass down to dnsmasq the socket mark to use for DNS queries. Bug: 16357676 Change-Id: I8933b6de198a92c2aaf0291931ace8966ddba275
* Fix WiFi-Direct and Tethering.Sreeram Ramachandran2014-07-221-27/+1
| | | | | | | | | | | | | | | A LocalNetwork object now always exists in the NetworkController, with a fixed NetId that's guaranteed not to collide with NetIds created by the framework. When routes are added on an interface tracked by the LocalNetwork, they are added to a fixed "local_network" table. When NAT is enabled, we add a special "iif -> oif" tethering rule. Bug: 15413694 Bug: 15413741 Change-Id: I36effc438d5ac193a77174493bf196cb68a5b97a
* Fix tethering in the case of a regular upstream connection.Sreeram Ramachandran2014-07-111-1/+27
| | | | | | | | | | | | | | Fixes tethering via Ethernet, Bluetooth and WiFi (hotspot). Tethering when the upstream has a DUN-specific APN is likely still broken (untested). For now, assign a fixed NetId (a hack) until we can change the framework to create a valid NetworkAgent and all that jazz. Bug: 15968336 Bug: 14988803 Change-Id: Idcf4d492d9329a9c87913e27be6dd835a792bea2
* server: check interface names in RPC arguments for validityJP Abgrall2014-06-191-0/+5
| | | | | | | | | | | | | | | | This patch introduces a method isIfaceName that checks interface names from various RPCs for validity before e.g. using them as part of iptables arguments or in filenames. All of these RPC calls can only be called from applications with at least the CONNECTIVITY_INTERNAL permission in recent Android versions, so the impact of the missing checks luckily isn't very high. Orig-Author: Jann Horn <jann@thejh.net> Change-Id: I80df8d745a3de99ad02d6649f0d10562c81f6b98 Signed-off-by: JP Abgrall <jpa@google.com>
* Turn on C++11 and make all warnings into errors.Sreeram Ramachandran2014-05-291-1/+0
| | | | | | | | | | | | | | | As a consequence: + Comment out the names of all unused parameters. + Remove all unused variables and functions. In server/Android.mk, there are a couple of non-trivial changes: + Use libcxx instead of stlport. This is needed to fix a bunch of errors due to specifying -std=c++11. + LOCAL_SHARED_LIBRARIES is sorted. Technically, the order in which libraries are listed has an effect on linking, but nobody should be doing such brittle things anyway. Change-Id: I0aff5b745e04609da23144d0e8be4c5694321b8b
* Move netd_client into netd.Sreeram Ramachandran2014-05-211-0/+313
Change-Id: Ie4b6b303225c93f2448a503d6ea9cebb552cbad5