summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-4.4.3_r1' into HEADcm-11.0-XNPH44S-bacon-5fa8c79c0bcm-11.0-XNPH33R-bacon-3628510d76cm-11.0-XNPH30O-bacon-4f280f505acm-11.0-XNPH05Q-tomato-9828f8e9cccm-11.0-XNPH05Q-bacon-5229c4ef56stable/cm-11.0-XNG3Cstable/cm-11.0-XNG2Sstable/cm-11.0-XNF9Xstable/cm-11.0-XNF8Ystable/cm-11.0shipping/cm-11.0cm-11.0Ricardo Cerqueira2014-06-0316-243/+353
|\ | | | | | | Android 4.4.3 release 1
| * DO NOT MERGE: Support translating fragmented packets.Lorenzo Colitti2014-03-106-35/+126
| | | | | | | | | | Bug: 11542311 Change-Id: I5dd29805e12b919ae3105b6128aaedefd7e78b48
| * DO NOT MERGE: Modify the pseudo-header checksum functions.Lorenzo Colitti2014-03-105-18/+18
| | | | | | | | | | | | | | | | | | | | | | - Remove the initial checksum, which we don't use anywhere. - Add the upper-layer protocol to the IPv6 function. Currently this is always the same as the next header field in the IPv6 header, but technically it's the upper-layer header after all the extension headers. This is required to support fragments. Bug: 11542311 Change-Id: Ifa8af1bfda182711a0bba5c6452f44045fbd1a7f
| * DO NOT MERGE: Move translation entry point into translate.c.Lorenzo Colitti2014-03-106-91/+73
| | | | | | | | | | | | | | | | | | | | | | 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: I821bb9590b9105ea1d425c3bbe0e634c4ce667b5
| * DO NOT MERGE: Fix up checksums instead of recalculating them.Lorenzo Colitti2014-03-106-36/+87
| | | | | | | | | | | | | | | | | | | | | | | | Currently the checksums of translated packets are calculated from scratch by checksumming the translated packet. This is slow and does not work in the case of fragments, because the whole packet is not available. Instead, calculate the checksum by adjusting the checksum of the original packet. Bug: 11542311 Bug: 12116252 Change-Id: I457347753d1bb5b23e3ae759bf2e4388102772d7
| * DO NOT MERGE: Add generic IP packet code and use it for GRE.Lorenzo Colitti2014-03-104-6/+29
| | | | | | | | | | Bug: 11542311 Change-Id: I91040f35814bd7b23288228a7fdf80f1be2f5a04
| * DO NOT MERGE: Fix compiler warnings and enable -Wall -WerrorLorenzo Colitti2014-03-105-12/+12
| | | | | | | | Change-Id: I4eb9eb407500893a27745ed2df6da9a378ddb159
| * DO NOT MERGE: Remove unused variablesBernhard Rosenkränzer2014-03-105-6/+2
| | | | | | | | | | | | | | | | Remove unused variables -- they cause warnings (and errors with -Werror) when building with clang 3.4. Change-Id: I6ef10841bc1384bf256d73874ae1e709caa6b132 Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
| * DO NOT MERGE: Remove two almost-unused include files.Lorenzo Colitti2014-03-106-54/+4
| | | | | | | | | | | | This fixes a compiler warning. Change-Id: I7f4a866fd5a65a64861fe22e9d32a1a8b8e9758d
| * Merge "Revert "DO NOT MERGE: Remove two almost-unused include files."" into ↵Lorenzo Colitti2014-03-086-4/+54
| |\ | | | | | | | | | klp-dev
| | * Revert "DO NOT MERGE: Remove two almost-unused include files."Lorenzo Colitti2014-03-086-4/+54
| | | | | | | | | | | | | | | | | | This reverts commit 86cb1ac3d69805bebcac7a18b408d656603028f4. Change-Id: If592b80e8107f468c2fe1caf00fcff49f25a9441
| * | Merge "Revert "DO NOT MERGE: Remove unused variables"" into klp-devLorenzo Colitti2014-03-085-2/+6
| |\ \
| | * | Revert "DO NOT MERGE: Remove unused variables"Lorenzo Colitti2014-03-085-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cb72f3643f475b70089e79108e16621787262e2b. Change-Id: I10196a15fe92e281d4922f384f373a964ff703ec
| * | | Merge "Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall ↵Lorenzo Colitti2014-03-085-12/+12
| |\ \ \ | | | | | | | | | | | | | | | -Werror"" into klp-dev
| | * | | Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror"Lorenzo Colitti2014-03-085-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d0024fbd9285f473cd0053e4816393dbd0706b85. Change-Id: I59201406f1f404b97c48877863835bdaeefc33e2
| * | | | Merge "Revert "DO NOT MERGE: Add generic IP packet code and use it for ↵Lorenzo Colitti2014-03-084-29/+6
| |\ \ \ \ | | | | | | | | | | | | | | | | | | GRE."" into klp-dev
| | * | | | Revert "DO NOT MERGE: Add generic IP packet code and use it for GRE."Lorenzo Colitti2014-03-084-29/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f10644ce653e130280e93da8a1096454a4d8d61a. Change-Id: Id70d629038e5269c64580b9a89f35179bc7c6926
| * | | | | Merge "Revert "DO NOT MERGE: Fix up checksums instead of recalculating ↵Lorenzo Colitti2014-03-086-87/+36
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | them."" into klp-dev
| | * | | | | Revert "DO NOT MERGE: Fix up checksums instead of recalculating them."Lorenzo Colitti2014-03-086-87/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 489e108988036facb25c59d59eb5250cf076fd3a. Change-Id: I39e24afd8e9f1c862c0b7eea872c4fe31240aecf
| * | | | | | Merge "Revert "DO NOT MERGE: Move translation entry point into ↵Lorenzo Colitti2014-03-086-73/+91
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | translate.c."" into klp-dev
| | * | | | | | Revert "DO NOT MERGE: Move translation entry point into translate.c."Lorenzo Colitti2014-03-086-73/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6c9862b607a198cfd1ee0141e4a19fcaafdff729. Change-Id: I4e55606814e650116e62ecb1f1d9a5a09c7ba2e0
| * | | | | | | Merge "Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."" ↵Lorenzo Colitti2014-03-085-18/+18
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | into klp-dev
| | * | | | | | | Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."Lorenzo Colitti2014-03-085-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fea4efa398ff9c86c300f0c1be92611d1d1fd5ba. Change-Id: If8199246b3f921e862a5e5ca587d5120906946e0
| * | | | | | | | Revert "DO NOT MERGE: Support translating fragmented packets."Lorenzo Colitti2014-03-086-126/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 866b4af18d8e9ef1020adc9accbb9f9de4c873dc. Change-Id: I864dc0cbf3ad0dc04b86ed4e84a46aaf02778429
| * | | | | | | | DO NOT MERGE: Support translating fragmented packets.Lorenzo Colitti2014-03-096-35/+126
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 11542311 Change-Id: I14a20b9ac669cdb5927f6ac26147bb0109099497
| * / / / / / / DO NOT MERGE: Modify the pseudo-header checksum functions.Lorenzo Colitti2014-03-095-18/+18
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove the initial checksum, which we don't use anywhere. - Add the upper-layer protocol to the IPv6 function. Currently this is always the same as the next header field in the IPv6 header, but technically it's the upper-layer header after all the extension headers. This is required to support fragments. Bug: 11542311 Change-Id: Ie1a20fa74ee5bc933c1014bab74ae2957979b2b8
| * / / / / / DO NOT MERGE: Move translation entry point into translate.c.Lorenzo Colitti2014-03-096-91/+73
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * / / / / DO NOT MERGE: Fix up checksums instead of recalculating them.Lorenzo Colitti2014-03-096-36/+87
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the checksums of translated packets are calculated from scratch by checksumming the translated packet. This is slow and does not work in the case of fragments, because the whole packet is not available. Instead, calculate the checksum by adjusting the checksum of the original packet. Bug: 11542311 Bug: 12116252 Change-Id: I6b78a94ca5bd96b13ee2653b6200551193b3dcc1
| * / / / DO NOT MERGE: Add generic IP packet code and use it for GRE.Lorenzo Colitti2014-03-094-6/+29
| |/ / / | | | | | | | | | | | | | | | | Bug: 11542311 Change-Id: I174e0b268869bc77927feeee57003580c47c30f2
| * / / DO NOT MERGE: Fix compiler warnings and enable -Wall -WerrorLorenzo Colitti2014-03-095-12/+12
| |/ / | | | | | | | | | Change-Id: I24847fa35644d92bff0fe31ccfc5c4b3e8705779
| * / DO NOT MERGE: Remove unused variablesBernhard Rosenkränzer2014-03-095-6/+2
| |/ | | | | | | | | | | | | | | 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>
| * DO NOT MERGE: Remove two almost-unused include files.Lorenzo Colitti2014-03-096-54/+4
| | | | | | | | | | | | This fixes a compiler warning. Change-Id: I14b5d3c871e9b2fdc8400d999e76e494ad510328
| * Add ip6 dummy address to keep data usage stats consistent.JP Abgrall2014-03-074-1/+18
| | | | | | | | | | | | | | | | | | | | | | 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
| * am 3b0d387b: (-s ours) Reconcile with jb-mr2-release - do not mergeThe Android Open Source Project2013-07-110-0/+0
| |\ | | | | | | | | | | | | * commit '3b0d387b0573657358c24208c8e201d377311132': Remove debug tag from the clatd.conf build target
| | * Reconcile with jb-mr2-release - do not mergeThe Android Open Source Project2013-07-090-0/+0
| | |\ | | | | | | | | | | | | Change-Id: Iaed3507a353fc057c8cc2bba136a043d61bc9e96
| | | * Remove debug tag from the clatd.conf build targetLorenzo Colitti2013-07-091-1/+0
| | | | | | | | | | | | | | | | | | | | Bug: 9730936 Change-Id: I2c50422c7b502d5b9bdc01afb55d25353f6c7088
* | | | Merge tag 'android-4.4_r1' into cm-11.0cm-11.0-XNPH25R-bacon-d22b777afacm-11.0-XNPH22R-bacon-03d77315eaRicardo Cerqueira2013-11-010-0/+0
|\| | | | | | | | | | | | | | | Android 4.4 Release 1.0
| * | | am 0d7837b9: Remove debug tag from the clatd.conf build targetLorenzo Colitti2013-07-080-0/+0
| |\| | | | | | | | | | | | | | | | | | * commit '0d7837b9dddce300713bfcf2b84aecf2e360a502': Remove debug tag from the clatd.conf build target
| * | | Remove debug tag from the clatd.conf build targetLorenzo Colitti2013-07-081-1/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | clatd is already built by default by generic_no_telephony.mk, and clatd.conf will be included in the same file by Id9ddf5541e894852eda8c471b9931c7c8bbbdc0a. Bug: 9730936 Change-Id: I0d457c99642264abac4957d614b4eb40111c23b9
* | | 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