summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-4.3_r2.1' into cm-10.2cm-10.2.1cm-10.2.0cm-10.2-M1stable/cm-10.2cm-10.2Ricardo Cerqueira2013-07-2441-0/+4052
|\ | | | | | | Android 4.3 release 2.1
| * Remove debug tag from the clatd.conf build targetLorenzo Colitti2013-07-091-1/+0
| | | | | | | | | | Bug: 9730936 Change-Id: I2c50422c7b502d5b9bdc01afb55d25353f6c7088
| * Support translating ICMP errors.Lorenzo Colitti2013-04-127-46/+331
| | | | | | | | | | | | | | | | | | 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
| * Improve checksum calculation and address checkingLorenzo Colitti2013-04-125-80/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Pass around packet data instead of fdsLorenzo Colitti2013-04-129-467/+383
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Merge "Treat the options as part of the TCP header." into jb-mr2-devLorenzo Colitti2013-04-124-82/+61
| |\
| | * Treat the options as part of the TCP header.Lorenzo Colitti2013-04-124-82/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the code and makes UDP and TCP look the same. It will also make it easier to implement nested translation in the future because there will only be one iovec array entry for the transport layer header, regardless of whether we are translating UDP or TCP and regardless of the presence of options. Also get rid of a couple of memcpy statements by pointing to the original data instead. Bug: 8276725 Change-Id: I6a702aefdf3a070eedfc6f7d3ebec21880ecc22b
| * | Merge "Slightly improve dumping packets" into jb-mr2-devLorenzo Colitti2013-04-112-4/+14
| |\|
| | * Slightly improve dumping packetsLorenzo Colitti2013-04-102-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | Add a function for dumping iovecs, and make hexdumps clearer by adding spaces between bytes. Bug: 8276725 Change-Id: Ifb2f8317613d05fa6bd600700090a6df258cde08
| * | Merge "Pass in the length to pseudo checksum functions" into jb-mr2-devLorenzo Colitti2013-04-114-33/+35
| |\|
| | * Pass in the length to pseudo checksum functionsLorenzo Colitti2013-04-094-33/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the pseudo-header checksum calculation functions get the transport layer length from the IP header. This requires that the length be known at IP header construction time, which does not allow transport layer translation functions to change the length of the packet later. Have the transport functions pass in the size directly. Bug: 8276725 Change-Id: I76a93f5e66181bec21d68f779c68c54090a77c33
| * | Add liblogYing Wang2013-04-091-1/+1
| | | | | | | | | | | | | | | Bug: 8580410 Change-Id: I22d0f0a30e5e42ff0c68805703747dd46ccf4fb6
| * | Configure the interface before bringing it upLorenzo Colitti2013-03-271-8/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Don't add the IPv4 default route in clatd.Lorenzo Colitti2013-03-191-7/+0
| | | | | | | | | | | | | | | | The IPv4 default route is now added by ConnectivityService because the stacked LinkProperties object contains it. Bug: 8276725 Change-Id: I6513bfa4df29b8663cefd30ed0bae1a80b63447c
| * Remove debug tag, as clatd is now built by defaultLorenzo Colitti2013-03-161-2/+0
| | | | | | | | | | | | | | | | | | https://googleplex-android-review.googlesource.com/285000 adds clatd to generic_no_telephony.mk, so clatd will be included on both user and debug builds. Bug: 8276725 Change-Id: I4b5292b6c48740f2ee3ac246f8ccd11c6ee3fdd8
| * Remove code to copy the default route.Lorenzo Colitti2013-03-073-48/+0
| | | | | | | | | | | | | | | | This is no longer necessary now that the kernel removes it for us when accept_ra = 2. Bug: 8276725 Change-Id: If16d9fbc63af2829f1ee4c87031f895f15a3b3d7
| * Stop setting accept_ra, now that netd does it.Lorenzo Colitti2013-03-051-34/+0
| | | | | | | | | | Bug: 8276725 Change-Id: Iedbd34bc94f678afe51429078e6c06ff144e6373
| * Merge "Make clatd a bit more robust when started by netd." into jb-mr2-devLorenzo Colitti2013-03-042-12/+23
| |\
| | * Make clatd a bit more robust when started by netd.Lorenzo Colitti2013-03-022-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | clatd: use correct header file.Nick Kralevich2013-02-281-1/+1
| |/ | | | | | | Change-Id: I8e7130c1c9b7d6397bc5e705e58667fb7b37b598
| * Change the IP addresses used by CLAT.Lorenzo Colitti2013-02-261-2/+2
| | | | | | | | | | | | | | | | | | - Change the IPv4 address to 192.0.0.4. This is one of the IPv4 addresses reserved by IANA for DS-Lite, so it's close enough. - Change the IPv6 IID to ::464. The current code uses an IID in the IANA reserved range. Change-Id: I6039f13efc7d20c433b03cd322fc82a3a45b84cf
| * Merge "Ensure netlink messages come from the kernel."Nick Kralevich2013-02-232-0/+19
| |\
| | * Ensure netlink messages come from the kernel.Lorenzo Colitti2013-02-222-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently clatd accepts all netlink messages without validating that they come from the kernel. This could allow another app to spoof these messages. Fix this by connecting the socket to the kernel so that no other process can send it messages. Bug: 7664960 Change-Id: I994641ea13cfd07fb25ccf52fcbbf5d1c9633ec4
| * | Don't compile packet dumping code by default.Lorenzo Colitti2013-02-012-1/+6
| |/ | | | | | | | | | | Bug: 7664960 Change-Id: Ieb56bcc010d0e12264d43e0a0dfcb1beb479d4e2
| * build and include for debug builds.JP Abgrall2012-11-141-1/+12
| | | | | | | | | | | | The builds the clatd and adds the needed conf file. Change-Id: Idb45a7b8b712ffaedddee9f3ca73d44001eaba81
| * android clat serviceDaniel Drown2012-11-1239-0/+3871
|/ | | | | | | | | | | | | | 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>
* Initial empty repositorycm-10.1.3-RC2cm-10.1.3-RC1cm-10.1.3cm-10.1.2cm-10.1.1cm-10.1.0-RC5cm-10.1.0-RC4cm-10.1.0-RC3cm-10.1.0-RC2cm-10.1.0-RC1cm-10.1.0cm-10.1-M3cm-10.1-M2cm-10.1-M1mr1.1-stagingcm-10.1Anatol Pomazau2012-03-060-0/+0