96d6901de7452ed1f0f11e264e44519f81d72aa2 |
|
10-Jun-2015 |
Masaya Hoshina <masaya.x.hoshina@sonymobile.com> |
Fix default_pdp_interface pointer reference The default_pdp_interface was an array until 1352a3a26c4d7c32b38b7fadb837799a23014aa6 but is now a pointer and should be used directly here. Change-Id: I153802bddb2412f1b1d9e7a61081a5c6d34ee2cb
/external/android-clat/clatd.c
|
4cc75ff1ce527949387107d9d140fb6a69e5e1f0 |
|
20-Feb-2015 |
Lorenzo Colitti <lorenzo@google.com> |
am 49454814: Make the raw socket and the tun fd nonblocking. * commit '49454814a0a714189916cb2aea1922bc8784b13b': Make the raw socket and the tun fd nonblocking.
|
f007c63fd437d1bd979bbe3882948776485ef55c |
|
20-Feb-2015 |
Lorenzo Colitti <lorenzo@google.com> |
am 9353be2a: Switch the receive path to memory-mapped I/O with PACKET_RX_RING. * commit '9353be2a5f1b4fd00b04e4c826f7f3c3ec6c5d46': Switch the receive path to memory-mapped I/O with PACKET_RX_RING.
|
49454814a0a714189916cb2aea1922bc8784b13b |
|
31-Jan-2015 |
Lorenzo Colitti <lorenzo@google.com> |
Make the raw socket and the tun fd nonblocking. Change-Id: I29a3d510ba0b766488bbd66d57829d9aaf70d21d
/external/android-clat/clatd.c
|
9353be2a5f1b4fd00b04e4c826f7f3c3ec6c5d46 |
|
03-Dec-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Switch the receive path to memory-mapped I/O with PACKET_RX_RING. Change-Id: I93231de8f108db782eaa43aceb6cc5281d3739c4
/external/android-clat/clatd.c
|
83c4203a9c1afe51c847960b82ff0f4de25a3e28 |
|
08-Dec-2014 |
Lorenzo Colitti <lorenzo@google.com> |
am 290b8427: Merge "Move tun functions to a new tun.c." * commit '290b84274989c82393a72f97f7c009094e74c651': Move tun functions to a new tun.c.
|
ff6f7fe4bd983c623d490100fa17cdb4936b95a2 |
|
08-Dec-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Move tun functions to a new tun.c. Change-Id: I4910b6cfca0bbf6bde2d1348f43d3131a1212399
/external/android-clat/clatd.c
|
798f9934fca523dfb57136bd185cf6e9460323ad |
|
31-Oct-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Use different IPv4 addresses on different clat interfaces. Previously the code would use 192.0.0.4 on all clat interfaces. This works, but it has the problem when a clat interface goes down, we do not reset TCP connections on its IP address if there is another clat interface up. Fix this by assigning every clat interface its own IP address in 192.0.0.0/29. Bug: 12111730 Change-Id: I28c831acd93b0980efea8e90c1cdf8b607beac68
/external/android-clat/clatd.c
|
8a41a5d140b3cf56a54bdeef234e89ee12cba0dc |
|
20-Oct-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Support 464xlat on broadcast interfaces such as wifi. This works by generating a random IID and then using the IPV6_JOIN_ANYCAST socket option on the write-only raw socket to configure an address on the interface. Change-Id: Ieb885b7c54454988e2e4254a14b4213cba3bd791
/external/android-clat/clatd.c
|
1352a3a26c4d7c32b38b7fadb837799a23014aa6 |
|
21-Oct-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Unduplicate IPv6 address setting code. Currently, the IPv6 address gets set in two different codepaths depending on whether it's being configured on startup or happens because the interface changed its prefix. Refactor the two into a common function. Change-Id: I37035401bef7a57ff40540bd0f2aed0f6863269d
/external/android-clat/clatd.c
|
7612916deb5f40a8dcf3a31db8849450e146fc8d |
|
20-Oct-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Support more than one clatd at a time. The only change necessary is to stop calling the clat interface "clat4" and instead name it based on the upstream interface (specifically, "v4-<interface>". Bug: 12111730 Change-Id: I489ebb0e3b1408ace8b64ca09ec20366fefe8d83
/external/android-clat/clatd.c
|
9808952bdf2fa6ce4cbd790d1967691bb95bf327 |
|
09-Oct-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Generate a random IID if one is not specified. - Add code to generate a random IPv6 address that's checksum-neutral with the NAT64 prefix and clat IPv4 address. - Only calculate the IP address after the NAT64 prefix is known. - Because the clat IPv6 address is no longer determinisitic, modify interface_poll so it checks whether the prefix has changed instead of checking whether the IPv6 address has changed. - Add/update unit tests. Change-Id: Ia53716ca5315ebdd0eaa3ad3a07552bf18e9dd5c
/external/android-clat/clatd.c
|
dce3ddf54083ccd0e3752c4c08013688f79baa7a |
|
26-Aug-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Call read on any event, not just on POLLIN. The main clatd event loop calls poll() in a loop, but reads only from FDs that have POLLIN set. This causes it to get into an infinite loop if one of the fds has POLLERR set. Instead, read from all fds that have reported events. The read causes the kernel to return the error to userspace and clear the socket error flag, and poll starts working correctly after that. Bug: 17183471 Bug: 17186694 Change-Id: Ie25853e0d60c077d2478b3e5154946e201f96dca
/external/android-clat/clatd.c
|
545bdca4e73b5aa56b81a735ead316eb6d33c326 |
|
19-Jul-2014 |
Elliott Hughes <enh@google.com> |
Remove unused #include. (cherry picked from commit 18921713780edb45ceef327d5fcf3387818300f3) Change-Id: I132f7a4ea1a73073fe22ca5f3d89644f2a302db3
/external/android-clat/clatd.c
|
3afe9ae11d9268037ca7b56c0aba4ef9ae477fd7 |
|
19-Jul-2014 |
Elliott Hughes <enh@google.com> |
Fix implicit declaration of function 'prctl' in clatd. (cherry picked from commit 787ea96922dc3942946fd4ad1e0495d4e06e0c2f) Change-Id: I4582222c8576353b800cc7d30f16c5dbe5f2e8a9
/external/android-clat/clatd.c
|
7045e27d4946330f3152218fdaa81b37d02b6d6c |
|
13-Jun-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Create the tun device after dropping root privileges. Currently, clatd creates the clat4 interface as root using root's dac_override abilities. Instead, change the drop_root code to acquire membership in the AID_VPN group, and use that membership to create the interface. This removes the need for dac_override. Change-Id: I1f824254f52a441f21c5b7963d9993be88cea2db
/external/android-clat/clatd.c
|
b9b471e1e3788a398adeb0a04bfc52d6ba7c3cf6 |
|
09-Jun-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Log unexpected arguments. (cherry picked from commit 3e7b1d8f783320d38382089a3c9a790ba13772dc) Bug: 15340961 Change-Id: Iff172b066aa468f9ee36aab661a8b51cb03db95b
/external/android-clat/clatd.c
|
7564761e2d98ce52a128b2338ec5edcd13aaed01 |
|
09-Jun-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Mark the raw socket used by clatd. This is required to use clatd on a non-default network. (cherry picked from commit 10c1adce5e85b429bf45bf7f0208c6c37245fbfb) Bug: 15340961 Change-Id: I779c83644727227a109bfeec1565364336b5ac2b
/external/android-clat/clatd.c
|
f08c5aa666d170c17abb784081897ea169c1b67f |
|
02-Jun-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Use a packet socket to receive packets. Combined with the previous change to send on a raw socket instead of a tunnel interface, this allows us to get rid of the clat interface and remove all the routing configuration code. (cherry picked from commit d44fac888a441cf21111358f43384f3942399d5d) Bug: 15340961 Change-Id: I2147dbfc07321bbd64d3fb9762b1120487712133
/external/android-clat/clatd.c
|
ce14088b80c2d22add83a616e567f9025d252ef7 |
|
02-Jun-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Use a raw socket to send IPv6 packets instead of a tun. This will allow us to bind the socket to a particular network. (cherry picked from commit 10e8827d636a72a7bcdfd52d15bad9342ae2a0a6) Bug: 15340961 Change-Id: I0b62ef96364a90b9c0a9e3ac3ba97b5c19c89b69
/external/android-clat/clatd.c
|
e24982ea3a4480d9d62c75b4d9a416b9479f7f0b |
|
02-Jun-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Make translate_packet take a fd instead of a tun header. This will make it easier to use separate fds for reading and writing in a future change. (cherry picked from commit 91d0f1bc6dd24e54ed3caef9b08525b332ab0adf) Bug: 15340961 Change-Id: I374b85f28ae570dc82d21e1ea82a2f072fd7fba3
/external/android-clat/clatd.c
|
464fb26dd770b52b44721d46ef00985dc8fc88ee |
|
03-Jun-2014 |
Paul Jensen <pauljensen@google.com> |
Fix build. Remove superfluous check triggering compiler error. (cherry picked from commit fc0f94a75c7a6d16ea9e327092f132a0d2c9175e) Change-Id: I0366eb3882948d77a8be2d5d32169a13f412ad4e
/external/android-clat/clatd.c
|
247dd7199b4e89c6a974794056b468bfac5f0e51 |
|
30-May-2014 |
Paul Jensen <pauljensen@google.com> |
Make DNS request for plat prefix detection network specific. When plat prefix detection is done on a non-default network it must use the network specific version of getaddrinfo() so the plat prefix corresponds to the particular network. The network is specified to clatd via a NetID command line argument. (cherry picked from commit a1c871c8efad6c0b69e27d3b85e82a27e282b8be) Change-Id: I270c5afc4b445cf20e95fd3e58eada6bc24b16ef
/external/android-clat/clatd.c
|
fcac410fa15613873a07143ccd46470b869346a3 |
|
25-Feb-2014 |
Brian Carlstrom <bdc@google.com> |
Use uint8_t not char for binary data to avoid -Wall -Werror issues on x86 builds Change-Id: Ib61e67f15360c27c3ebf61f870a9482217c52357
/external/android-clat/clatd.c
|
57d480d2b425ef20d8b6f84abd4e9e3209fa9422 |
|
09-Feb-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Support translating fragmented packets. Bug: 11542311 Change-Id: I14a20b9ac669cdb5927f6ac26147bb0109099497
/external/android-clat/clatd.c
|
f9390605bacda7bbe8ea33aa0a39c1581ff6aea2 |
|
12-Feb-2014 |
Lorenzo Colitti <lorenzo@google.com> |
Move translation entry point into translate.c. The entry point to the translation code is currently called packet_handler and lives in clatd.c. Move it into translate.c and rename it to translate_packet, since that's what it does. Also get rid of some redundant includes. Bug: 11542311 Change-Id: I8529fb87f3a86ee6724fad54787c33a5e86c56ab
/external/android-clat/clatd.c
|
a33592bd08a20c6a521b8508975b7a74ecdf4f03 |
|
12-Dec-2013 |
Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> |
Remove unused variables Remove unused variables -- they cause warnings (and errors with -Werror) when building with clang 3.4. Change-Id: I03fff9b1b9d620763f41c8b31a19c4724726739c Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
/external/android-clat/clatd.c
|
4e0dd83686869c292e162dc76992863d3f3a3c38 |
|
20-Dec-2013 |
JP Abgrall <jpa@google.com> |
Add ip6 dummy address to keep data usage stats consistent. Because of the way the tunnel pumps packets into the networking stack, the netfilter xt_qtaguid module can't track stats accurately: the totals don't add up. With "clat" having an ip address, qtaguid will track stats against it, which then can be deducted from the external iface. Bug: 11687690 Change-Id: I22ebf26dd9249e821da87665d2bfb0e54d3cdf64
/external/android-clat/clatd.c
|
9477a464bd70849bcddcb8d11613cff117235cb0 |
|
18-Nov-2013 |
Lorenzo Colitti <lorenzo@google.com> |
Fix compiler warnings and enable -Wall -Werror Change-Id: I24847fa35644d92bff0fe31ccfc5c4b3e8705779
/external/android-clat/clatd.c
|
07fc7614a14f024857fcb4880b308df6e8c297d0 |
|
18-Nov-2013 |
Lorenzo Colitti <lorenzo@google.com> |
Remove two almost-unused include files. This fixes a compiler warning. Change-Id: I14b5d3c871e9b2fdc8400d999e76e494ad510328
/external/android-clat/clatd.c
|
cd70b354eb985678175904a937085bed6094af77 |
|
09-Apr-2013 |
Lorenzo Colitti <lorenzo@google.com> |
Support translating ICMP errors. When receiving ICMPv6 messages from IPv6-only nodes, use 255.0.0.<ttl> as a fake IPv4 source address. It's better than nothing. Bug: 8276725 Change-Id: Iae93f75764cb9cd875af9bb5f1862a0dce2c2fa7
/external/android-clat/clatd.c
|
ee80ca65907d214e2483e315a1ba7f610184de03 |
|
10-Apr-2013 |
Lorenzo Colitti <lorenzo@google.com> |
Improve checksum calculation and address checking 1. Add a function that calculates the checksum of all the packet components starting from the specified position. This simplifies the code a bit and makes it easier to translate nested packets like ICMP error messages. 2. Don't hardcode IP source and destination addresses. This is required to translate ICMP error messages. Bug: 8276725 Change-Id: I2cae45683ae3943e508608fd0a140180dbc60823
/external/android-clat/clatd.c
|
d90841824dc00f65a48a789396c7f428807432ca |
|
21-Mar-2013 |
Lorenzo Colitti <lorenzo@google.com> |
Pass around packet data instead of fds The current code calls all the translation functions one after another, accumulating the translated packet into local variables on the stack and calling writev() at the end. This does not allow calling the translation functions re-entrantly, which is needed, for example, to translate ICMP errors (which contain the packet that caused them). Define a clat_packet type to wrap the array of iovecs and an enum of packet positions. Also clean up the code a bit: get rid of a fair bit of duplicated code (though there is still some left), get rid of some redundant memcpy statements, fix style issues, etc. Bug: 8276725 Change-Id: Ib58d2348894e82275234fc67dbdb1f82753f204f
/external/android-clat/clatd.c
|
3ca0302031b14c6fcb9be147e875fb794bfc583b |
|
26-Mar-2013 |
Lorenzo Colitti <lorenzo@google.com> |
Configure the interface before bringing it up Currently, clatd brings the clat4 interface up before assigning its IPv4 address. This can cause a race condition, because as soon as the interface comes up, the framework notices and reads the interface configuration into the LinkProperties. If this happens before the IPv4 address is configured, then the framework ends up thinking clat4's IPv4 address is 0.0.0.0/0. Fix this by configuring the address before the interface is brought up. Currently the framework does not use this address for anything, so this is purely cosmetic, but it could make debugging more confusing. Bug: 8276725 Change-Id: I2bfee586a0d70050c53b10cc3f7eb9a98173e11d
/external/android-clat/clatd.c
|
41e758e33e6c3b43f363591d4113dea54a4330d9 |
|
12-Mar-2013 |
Lorenzo Colitti <lorenzo@google.com> |
Don't add the IPv4 default route in clatd. The IPv4 default route is now added by ConnectivityService because the stacked LinkProperties object contains it. Bug: 8276725 Change-Id: I6513bfa4df29b8663cefd30ed0bae1a80b63447c
/external/android-clat/clatd.c
|
678a9b4bcf78d062675c9543323ad89f0342136c |
|
04-Mar-2013 |
Lorenzo Colitti <lorenzo@google.com> |
Remove code to copy the default route. This is no longer necessary now that the kernel removes it for us when accept_ra = 2. Bug: 8276725 Change-Id: If16d9fbc63af2829f1ee4c87031f895f15a3b3d7
/external/android-clat/clatd.c
|
1373eac3f8305f6ad834ba8e3fc4f1a75cd8ac5a |
|
04-Mar-2013 |
Lorenzo Colitti <lorenzo@google.com> |
Stop setting accept_ra, now that netd does it. Bug: 8276725 Change-Id: Iedbd34bc94f678afe51429078e6c06ff144e6373
/external/android-clat/clatd.c
|
89c05b9344eb0bdc52fc0d69bb3724bae7dbc90c |
|
04-Mar-2013 |
Lorenzo Colitti <lorenzo@google.com> |
Merge "Make clatd a bit more robust when started by netd." into jb-mr2-dev
|
baf62997b598ac38a99fd30419ccf7c109ffb3bc |
|
01-Mar-2013 |
Lorenzo Colitti <lorenzo@google.com> |
Make clatd a bit more robust when started by netd. 1. When started from netd, DNS lookups (used to detect the NAT64 prefix) fail because ANDROID_DNS_MODE=local. Unset it. 2. Only add the SIGTERM handler just before starting the event loop. Otherwise, if clatd hangs before the event loop is started (e.g., when #1 happens), it can't be stopped. While I'm at it, add a couple of logging statements. Change-Id: Ie24b37e34b729ce6cd3769b5d64348f2c1b9627d
/external/android-clat/clatd.c
|
2edb7567d3d5373617c236801766e928c6a3dbcb |
|
28-Feb-2013 |
Nick Kralevich <nnk@google.com> |
clatd: use correct header file. Change-Id: I8e7130c1c9b7d6397bc5e705e58667fb7b37b598
/external/android-clat/clatd.c
|
a45056e35c1af2a0f0a6eed258fd5fdf4846a79f |
|
23-Mar-2012 |
Daniel Drown <dan-android@drown.org> |
android clat service This software provides the nat 4->6 translation needed for the "clat" part of the 464xlat standard. It is needed for better IPv4 application support while on an IPv6-only mobile network connection using 464xlat's nat64 (such as T-Mobile's IPv6 trial). A general diagram of how 464xlat works: http://dan.drown.org/android/clat/Clat-Plat.png Depends-on: I2392f8127dcd90d16b0f20ff31bcc5aa096db464 Change-Id: If2bc6916fc66fd4bca7cc241c83cfae839b82e15 Signed-off-by: Daniel Drown <dan-android@drown.org>
/external/android-clat/clatd.c
|