History log of /external/android-clat/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2596f42a4f4c42bfb96ccbfc2700dbf70502ec75 11-Nov-2014 Lorenzo Colitti <lorenzo@google.com> Never use a statically-configured IID on wifi.

Bug: 12111730
Change-Id: I062d81f2b65e6e89baae0f840cbd673f8051d523
ndroid.mk
latd_test.cpp
onfig.c
onfig.h
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
latd.c
latd.conf
latd_test.cpp
onfig.c
onfig.h
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
latd.c
etif.c
etif.h
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
latd.c
onfig.c
onfig.h
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
latd.c
latd.h
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
ndroid.mk
hecksum.h
latd.c
latd.conf
latd_test.cpp
onfig.c
onfig.h
74151e9d0cda83f77d9dbce62bf8a1340cb08386 23-Oct-2014 Sreeram Ramachandran <sreeram@google.com> Cleanup: Remove unused "ipv6_local_address".

This was originally used on the "clat" interface. That interface is not created
anymore (since the switch to using a raw socket). Note that the v6 address used
on the raw socket is a combination of the plat subnet plus a host ID, and not
this link-local address.

Also fixup default values to match clatd.conf values.

Change-Id: I3470a02e6798b65cae0f8d7f074ce51fb0647e6a
latd.conf
onfig.c
onfig.h
0ec5dfa1da6a97532dc8cca825bae4edfb7d3dce 22-Sep-2014 Erik Kline <ek@google.com> Simplify and always retry DNS64 prefix discovery.

- Only request AAAAs for the IPv4-only hostname, since that's
all the information being used. Perhaps at some point in the
future when _validation_ of the IPv4 address(es)'s presence
within the IPv6 address(es) is being done this should be
revisited.

- Only use the first AAAA returned to find the DNS64 prefix.
It's not clear how to properly resolve any potential DNS64
prefix conflicts anyway.

- Re-try DNS64 prefix discovery on any type of error.
If clatd was started (presumably an IPv6-only network), retry
DNS64 prefix discovery with exponential backoff. Some
"permanent" errors can be indistinguishable from transient
errors (e.g. receiving an erroneous SERVFAIL from a DNS
resolver, ...).

- Fix-up back-off logic to not sleep 128 then 120, 120, ...
:-)

Bug: 17569702
Change-Id: I226ea7772cd7c88d2b60153ef76e5435400e11aa
onfig.c
ns64.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
latd.c
latd.h
545bdca4e73b5aa56b81a735ead316eb6d33c326 19-Jul-2014 Elliott Hughes <enh@google.com> Remove unused #include.

(cherry picked from commit 18921713780edb45ceef327d5fcf3387818300f3)

Change-Id: I132f7a4ea1a73073fe22ca5f3d89644f2a302db3
latd.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
latd.c
f7a65d9b7f36f53b9cb34c834b4298fbacec15ee 17-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am 913e2e49: am 7045e27d: Create the tun device after dropping root privileges.

* commit '913e2e493b229493eb43a0e136c5c3f6b568b5de':
Create the tun device after dropping root privileges.
913e2e493b229493eb43a0e136c5c3f6b568b5de 17-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am 7045e27d: Create the tun device after dropping root privileges.

* commit '7045e27d4946330f3152218fdaa81b37d02b6d6c':
Create the tun device after dropping root privileges.
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
latd.c
ed58355eae76529c74e52658caaa1e7b45c3a96b 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am 87342f29: am b9b471e1: Log unexpected arguments.

* commit '87342f29a9bbf15db4867941e4d3bb2e4fd11053':
Log unexpected arguments.
78d6b188430b572d967afb3e23d9c4ebc86d81e2 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am 522930f0: (-s ours) am 7564761e: Mark the raw socket used by clatd.

* commit '522930f0659319bf8d3d22b72a7d68280de295fe':
Mark the raw socket used by clatd.
db42831e6be43c8ae573cbdd806ae51b3339c2c4 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am fa6e9d32: (-s ours) am f08c5aa6: Use a packet socket to receive packets.

* commit 'fa6e9d325622d7a507b2e9d19e2e145647295ee6':
Use a packet socket to receive packets.
858e3e06a3947a58594c52f41f94464e75188e60 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am ffe528a9: (-s ours) am ce14088b: Use a raw socket to send IPv6 packets instead of a tun.

* commit 'ffe528a969017b7d1687528ddf580395e54fb99d':
Use a raw socket to send IPv6 packets instead of a tun.
85ce650592fb5e832f56642714bb5866d6eb2f05 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am d3edb277: (-s ours) am e24982ea: Make translate_packet take a fd instead of a tun header.

* commit 'd3edb2776e549f0952332055401ab4c5d743695c':
Make translate_packet take a fd instead of a tun header.
90bc01fbdbcf896df99d1801a98033a9be1d87fb 13-Jun-2014 Paul Jensen <pauljensen@google.com> am 0c41b16c: (-s ours) am 464fb26d: Fix build. Remove superfluous check triggering compiler error.

* commit '0c41b16cf8db8c4df06ae8829cb1f0223203f212':
Fix build. Remove superfluous check triggering compiler error.
2131c12d69a0f5baf55938454d3f03e928c74387 13-Jun-2014 Paul Jensen <pauljensen@google.com> am 2bee04db: (-s ours) am 247dd719: Make DNS request for plat prefix detection network specific.

* commit '2bee04db5c7be266919c588c8a06d60f51067baa':
Make DNS request for plat prefix detection network specific.
87342f29a9bbf15db4867941e4d3bb2e4fd11053 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am b9b471e1: Log unexpected arguments.

* commit 'b9b471e1e3788a398adeb0a04bfc52d6ba7c3cf6':
Log unexpected arguments.
522930f0659319bf8d3d22b72a7d68280de295fe 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am 7564761e: Mark the raw socket used by clatd.

* commit '7564761e2d98ce52a128b2338ec5edcd13aaed01':
Mark the raw socket used by clatd.
fa6e9d325622d7a507b2e9d19e2e145647295ee6 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am f08c5aa6: Use a packet socket to receive packets.

* commit 'f08c5aa666d170c17abb784081897ea169c1b67f':
Use a packet socket to receive packets.
ffe528a969017b7d1687528ddf580395e54fb99d 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am ce14088b: Use a raw socket to send IPv6 packets instead of a tun.

* commit 'ce14088b80c2d22add83a616e567f9025d252ef7':
Use a raw socket to send IPv6 packets instead of a tun.
d3edb2776e549f0952332055401ab4c5d743695c 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> am e24982ea: Make translate_packet take a fd instead of a tun header.

* commit 'e24982ea3a4480d9d62c75b4d9a416b9479f7f0b':
Make translate_packet take a fd instead of a tun header.
0c41b16cf8db8c4df06ae8829cb1f0223203f212 13-Jun-2014 Paul Jensen <pauljensen@google.com> am 464fb26d: Fix build. Remove superfluous check triggering compiler error.

* commit '464fb26dd770b52b44721d46ef00985dc8fc88ee':
Fix build. Remove superfluous check triggering compiler error.
2bee04db5c7be266919c588c8a06d60f51067baa 13-Jun-2014 Paul Jensen <pauljensen@google.com> am 247dd719: Make DNS request for plat prefix detection network specific.

* commit '247dd7199b4e89c6a974794056b468bfac5f0e51':
Make DNS request for plat prefix detection network specific.
b9b471e1e3788a398adeb0a04bfc52d6ba7c3cf6 09-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Log unexpected arguments.

(cherry picked from commit 3e7b1d8f783320d38382089a3c9a790ba13772dc)

Bug: 15340961
Change-Id: Iff172b066aa468f9ee36aab661a8b51cb03db95b
latd.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
latd.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
ndroid.mk
latd.c
latd.h
onfig.c
ump.c
etroute.c
etroute.h
etroute.c
etroute.h
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
latd.c
latd.h
latd_test.cpp
ranslate.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
latd.c
latd_test.cpp
ranslate.c
ranslate.h
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
latd.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
ndroid.mk
latd.c
onfig.c
onfig.h
ns64.c
ns64.h
3e7b1d8f783320d38382089a3c9a790ba13772dc 09-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Log unexpected arguments.

Bug: 15340961
Change-Id: Icde62d209e236d0156bf643bab694b92792be913
latd.c
10c1adce5e85b429bf45bf7f0208c6c37245fbfb 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.

Bug: 15340961
Change-Id: I289e5600da31e963a13c00679fa816f576678d61
latd.c
d44fac888a441cf21111358f43384f3942399d5d 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.

Bug: 15340961
Change-Id: I9d9b90f9b4f58dcc3c102abcdc32a2c7ee86b01d
ndroid.mk
latd.c
latd.h
onfig.c
ump.c
etroute.c
etroute.h
etroute.c
etroute.h
10e8827d636a72a7bcdfd52d15bad9342ae2a0a6 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.

Bug: 15340961
Change-Id: I50857d372955f2b6f7035157c2968cda72c32585
latd.c
latd.h
latd_test.cpp
ranslate.c
91d0f1bc6dd24e54ed3caef9b08525b332ab0adf 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.

Bug: 15340961
Change-Id: I5b081b05765cae0488ac599be5738ce9737cae41
latd.c
latd_test.cpp
ranslate.c
ranslate.h
fc0f94a75c7a6d16ea9e327092f132a0d2c9175e 03-Jun-2014 Paul Jensen <pauljensen@google.com> Fix build. Remove superfluous check triggering compiler error.

Change-Id: I408b54938acfa475cf8734a50a5459218a4b325a
latd.c
a1c871c8efad6c0b69e27d3b85e82a27e282b8be 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.

Change-Id: I77a47b24e68c7786f790974f05787a40a4934af5
ndroid.mk
latd.c
onfig.c
onfig.h
ns64.c
ns64.h
079fd2305ef90d95a1bfdb200e2975e9db86bf43 28-Apr-2014 Paul Jensen <pauljensen@google.com> Place clatd ip routing rule into local table rather than main table
as the main table is not used for routing when per-network tables
are being used and clatd's rule is for locally destined packets.

Change-Id: I243397b57c946f4af4c2439242b90208b01e84f0
etroute.c
9cacfde96781ab5d18d2021badecf037f15c8f31 30-Apr-2014 Bill Yi <byi@google.com> am 0a1b9dac: am e64eccb6: Merge commit \'d2346cad4215e2a5c50f7fd7d6d3f46c80286330\' into HEAD

* commit '0a1b9dac7b826cea78189d45959aba156ee4478f':
0a1b9dac7b826cea78189d45959aba156ee4478f 30-Apr-2014 Bill Yi <byi@google.com> am e64eccb6: Merge commit \'d2346cad4215e2a5c50f7fd7d6d3f46c80286330\' into HEAD

* commit 'e64eccb68b8101d8fa2effb826e185db7f82dba9':
e64eccb68b8101d8fa2effb826e185db7f82dba9 29-Apr-2014 Bill Yi <byi@google.com> Merge commit 'd2346cad4215e2a5c50f7fd7d6d3f46c80286330' into HEAD
2ab8b9ece11cf31e8c9c29acb5e40110136b5094 03-Apr-2014 Ben Cheng <bccheng@google.com> am 91ea05d6: am 932614ee: Minor code clean-up for GCC 4.9.

* commit '91ea05d6b6820e6b283cb3431e09d8e53cccb2e7':
Minor code clean-up for GCC 4.9.
91ea05d6b6820e6b283cb3431e09d8e53cccb2e7 03-Apr-2014 Ben Cheng <bccheng@google.com> am 932614ee: Minor code clean-up for GCC 4.9.

* commit '932614ee5e740704d7ef951dff6daede4fe12904':
Minor code clean-up for GCC 4.9.
932614ee5e740704d7ef951dff6daede4fe12904 03-Apr-2014 Ben Cheng <bccheng@google.com> Minor code clean-up for GCC 4.9.

- Tidy up "signed vs unsigned" comparison
- Unconditionally initialize the "protocol" variable. This is a
false-positive warning as protocol is indeed initialized when used,
but GCC failed to detect the dependency between protocol and ip6.

Change-Id: I8146898d91d45531c3de73403e0df3330c0a2043
latd_test.cpp
978478adc2062705a96c2279c60d92020c93a46f 18-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 1e02324b: am cd254c95: Update BUGS and bump version to 1.2

* commit '1e02324b199f11f4ca310008f40b819be6662478':
Update BUGS and bump version to 1.2
d2346cad4215e2a5c50f7fd7d6d3f46c80286330 18-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am cd254c95: Update BUGS and bump version to 1.2

* commit 'cd254c95a7cb5961bd53d16737f06bf261426e38':
Update BUGS and bump version to 1.2
1e02324b199f11f4ca310008f40b819be6662478 18-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am cd254c95: Update BUGS and bump version to 1.2

* commit 'cd254c95a7cb5961bd53d16737f06bf261426e38':
Update BUGS and bump version to 1.2
48a2899e3e029c66f7937641fa94e1c8949642be 17-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 11f6795e: am 4d478421: Put the native test in the proper location.

* commit '11f6795e76026dac548140fe9b5b5c5b0faa4c5a':
Put the native test in the proper location.
cd254c95a7cb5961bd53d16737f06bf261426e38 17-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Update BUGS and bump version to 1.2

Change-Id: Ib8dea3efa57ac2f2e509527fe3da7eea31432d43
UGS
latd.h
11f6795e76026dac548140fe9b5b5c5b0faa4c5a 17-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 4d478421: Put the native test in the proper location.

* commit '4d4784214bf7f03fc53c167777be87e512c6ed54':
Put the native test in the proper location.
2dd3f139a3657d570e9f5952a2e7d5e943dab876 17-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 4d478421: Put the native test in the proper location.

* commit '4d4784214bf7f03fc53c167777be87e512c6ed54':
Put the native test in the proper location.
4d4784214bf7f03fc53c167777be87e512c6ed54 26-Feb-2014 Lorenzo Colitti <lorenzo@google.com> Put the native test in the proper location.

Change-Id: Ieaf90050ccc80a8d04976dd96ac66d8853a48f0a
ndroid.mk
9aeafc87862e2209aab78bfd86b62c88fde25537 14-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 1b1146be: resolved conflicts for merge of e22ed104 to klp-modular-dev-plus-aosp

* commit '1b1146be79ad58a52ca1ef84c4216039e054a024':
DO NOT MERGE: Support translating fragmented packets.
6ecc81155cfde5cf07d0111b3a2532be1fac4139 14-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am c641fffc: resolved conflicts for merge of e50d5767 to klp-modular-dev-plus-aosp

* commit 'c641fffcd3a69416fa82933ac16d11e9a687dc26':
DO NOT MERGE: Modify the pseudo-header checksum functions.
dfe7ff80e18e84cf7437e1d600103e10578c3dec 14-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 786e40a3: resolved conflicts for merge of 253009ac to klp-modular-dev-plus-aosp

* commit '786e40a32eed699662332e197f3d7953d3e60b03':
DO NOT MERGE: Move translation entry point into translate.c.
5384357c7ba9d369cf6264a03bd3f9240a76ac76 14-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 35c9ff94: resolved conflicts for merge of c87d5c75 to klp-modular-dev-plus-aosp

* commit '35c9ff942a2a8b85ac5d2ff97c7d4ff30234dd80':
DO NOT MERGE: Fix up checksums instead of recalculating them.
1cc2429b9929c94d15cef48c3f46bd09772c0de2 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 0b55c77e: (-s ours) am 892f3161: am 57bcefd5: DO NOT MERGE: Add generic IP packet code and use it for GRE.

* commit '0b55c77e96ec1804f5b4eb0fde4bb22d79a55cad':
DO NOT MERGE: Add generic IP packet code and use it for GRE.
1bb72b47300e8381432a7cc9eea583a8a0ec5dcb 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 97b6a96d: resolved conflicts for merge of ab8f4f89 to klp-modular-dev-plus-aosp

* commit '97b6a96d8ca7313413752e6369210a233dfe994d':
DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror
1b1146be79ad58a52ca1ef84c4216039e054a024 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of e22ed104 to klp-modular-dev-plus-aosp

Change-Id: I6d77583042b4707e4e9dda7c4641019c5c5a7248
c641fffcd3a69416fa82933ac16d11e9a687dc26 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of e50d5767 to klp-modular-dev-plus-aosp

Change-Id: Id1c0debfcbbfd76641368b481afc8b96cd822705
786e40a32eed699662332e197f3d7953d3e60b03 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of 253009ac to klp-modular-dev-plus-aosp

Change-Id: I0d56e3d9e899c542ef0ed8d1c2e12004e24d7044
35c9ff942a2a8b85ac5d2ff97c7d4ff30234dd80 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of c87d5c75 to klp-modular-dev-plus-aosp

Change-Id: I6b3ad7d2bf6859b5e4505aa6fae2e909a8767019
0b55c77e96ec1804f5b4eb0fde4bb22d79a55cad 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 892f3161: am 57bcefd5: DO NOT MERGE: Add generic IP packet code and use it for GRE.

* commit '892f316143425ee78948c9de4518ac95145e525b':
DO NOT MERGE: Add generic IP packet code and use it for GRE.
97b6a96d8ca7313413752e6369210a233dfe994d 12-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of ab8f4f89 to klp-modular-dev-plus-aosp

Change-Id: Ia07d5557d52452d27d6c1f1efbfaee3fc48e1fb1
85614fdb99bd3f4d825090a1b6c5c1f3d8800d38 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of 56ec161d to klp-dev-plus-aosp

Change-Id: Idabec48d303cae126d9b80a2b1181f28927e2a9d
e22ed104cc8fee7f1cae33edeafc59758aa7f446 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 2b4cc739: DO NOT MERGE: Support translating fragmented packets.

* commit '2b4cc7393268622ac3de071435a6e4ab857342df':
DO NOT MERGE: Support translating fragmented packets.
e50d57677775e32832d59bfa09c3f13291b47686 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 13a58c48: DO NOT MERGE: Modify the pseudo-header checksum functions.

* commit '13a58c4859164d9f16e124b0f85c35a061dec76d':
DO NOT MERGE: Modify the pseudo-header checksum functions.
253009acdf7908fd3b9a62b08327fd593c93953f 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am f0029d7d: DO NOT MERGE: Move translation entry point into translate.c.

* commit 'f0029d7d06cc8401686ddf379a609b29f511f1a5':
DO NOT MERGE: Move translation entry point into translate.c.
c87d5c752b34b95be53467a43f228c6081809843 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am c1be4799: DO NOT MERGE: Fix up checksums instead of recalculating them.

* commit 'c1be4799c39775fecb004d92687fe95298cac380':
DO NOT MERGE: Fix up checksums instead of recalculating them.
892f316143425ee78948c9de4518ac95145e525b 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 57bcefd5: DO NOT MERGE: Add generic IP packet code and use it for GRE.

* commit '57bcefd5920c330f03aa76329b9f97f3f1e841ac':
DO NOT MERGE: Add generic IP packet code and use it for GRE.
ab8f4f89dd9a7805f57aff3884b7de1c34694634 13-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of c2549b4b to klp-modular-dev

Change-Id: Ic42c011544f9b0438637f980749c8182214615fd
d9a706fbf242fa47b0dbfd7d6248f78a8cba9eff 12-Mar-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> am 62bb354d: (-s ours) am 6522fccd: am 72f3126f: DO NOT MERGE: Remove unused variables

* commit '62bb354dcdbe9fc93344a2727dc89720e420db81':
DO NOT MERGE: Remove unused variables
68421cfdfb77a36f1eadf731f3ddc3e008d0d956 12-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 27b788e7: (-s ours) am 980dc9d5: am 82ab7306: DO NOT MERGE: Remove two almost-unused include files.

* commit '27b788e7f271b2b1746b6cf0071f7028f9d6e950':
DO NOT MERGE: Remove two almost-unused include files.
62bb354dcdbe9fc93344a2727dc89720e420db81 12-Mar-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> am 6522fccd: am 72f3126f: DO NOT MERGE: Remove unused variables

* commit '6522fccd3d186c2d4fb479e6626d9f1ab8dc45ba':
DO NOT MERGE: Remove unused variables
27b788e7f271b2b1746b6cf0071f7028f9d6e950 12-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 980dc9d5: am 82ab7306: DO NOT MERGE: Remove two almost-unused include files.

* commit '980dc9d52a51254654d8067c973bd3a70db0f371':
DO NOT MERGE: Remove two almost-unused include files.
6522fccd3d186c2d4fb479e6626d9f1ab8dc45ba 11-Mar-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> am 72f3126f: DO NOT MERGE: Remove unused variables

* commit '72f3126f6499cd9017b367f5c7e61cab1d99d080':
DO NOT MERGE: Remove unused variables
980dc9d52a51254654d8067c973bd3a70db0f371 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 82ab7306: DO NOT MERGE: Remove two almost-unused include files.

* commit '82ab730688b8aa5290bdb3d4287e51d3c04f5c95':
DO NOT MERGE: Remove two almost-unused include files.
8ce30b9eebebd8d9318e5fd08cf0bd6ef4894792 11-Mar-2014 Elliott Hughes <enh@google.com> am d6c9bc21: TARGET_SIMULATOR is long dead.

* commit 'd6c9bc21e673110aec61157419964b2e57c16078':
TARGET_SIMULATOR is long dead.
e6e2c3be2da6caaf7972ce96d7f40c9c595130d5 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am a4454bfd: Declare pos as clat_packet_index instead of int

* commit 'a4454bfda99803c287b78f8d1cd7bdc1b56065db':
Declare pos as clat_packet_index instead of int
0d0917b5305225aafa5ef8a4d7cbdcdccd4cd8eb 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 2b4cc739: DO NOT MERGE: Support translating fragmented packets.

* commit '2b4cc7393268622ac3de071435a6e4ab857342df':
DO NOT MERGE: Support translating fragmented packets.
5bce804ce63270ac68e7d7cc1d00d48119678ce9 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of 13a58c48 to klp-dev-plus-aosp

Change-Id: Idfca8179c5f9829cf24f53f8e4e7f3f4f32234b0
5d7878eaaa04843bb1fb65d4aa72f58459c72c33 11-Mar-2014 Brian Carlstrom <bdc@google.com> am fcac410f: Use uint8_t not char for binary data to avoid -Wall -Werror issues on x86 builds

* commit 'fcac410fa15613873a07143ccd46470b869346a3':
Use uint8_t not char for binary data to avoid -Wall -Werror issues on x86 builds
c86acc471f95cfeeedc396043312cd45f92d8ddf 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am f3beefc9: Add a unit test for 464xlat translation code.

* commit 'f3beefc96a5a4f295562f60d648bd6e795980a10':
Add a unit test for 464xlat translation code.
a81cdae4a3ddbde7b32af0090ad16ff3b187a25d 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 57d480d2: Support translating fragmented packets.

* commit '57d480d2b425ef20d8b6f84abd4e9e3209fa9422':
Support translating fragmented packets.
1a62f5d8e777eed3486d7abc3bb03daa94f16bf9 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of 07f02658 to klp-dev-plus-aosp
48ce8aaf3d9baa735b047833451228657266b068 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am f0029d7d: DO NOT MERGE: Move translation entry point into translate.c.

* commit 'f0029d7d06cc8401686ddf379a609b29f511f1a5':
DO NOT MERGE: Move translation entry point into translate.c.
f3d21ef8ba23c8be066cb94e4a2f02bf1046ea1c 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am c1be4799: DO NOT MERGE: Fix up checksums instead of recalculating them.

* commit 'c1be4799c39775fecb004d92687fe95298cac380':
DO NOT MERGE: Fix up checksums instead of recalculating them.
bf2ac2cccd54f88bd0e4969576cd90f31e3fc1c3 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 57bcefd5: DO NOT MERGE: Add generic IP packet code and use it for GRE.

* commit '57bcefd5920c330f03aa76329b9f97f3f1e841ac':
DO NOT MERGE: Add generic IP packet code and use it for GRE.
a80ff4d0dca5cc353fbc177b30a394775bd6d48a 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of c2549b4b to klp-dev-plus-aosp

Change-Id: I70c8ae70d1d39892e66668ed5c1e69b54d665231
fcdb0f99f51bb2cddf093f7831fb24e504501765 11-Mar-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> am 72f3126f: DO NOT MERGE: Remove unused variables

* commit '72f3126f6499cd9017b367f5c7e61cab1d99d080':
DO NOT MERGE: Remove unused variables
040fb94d21cf32a28040f41f9cb3808bfacfe45e 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 82ab7306: DO NOT MERGE: Remove two almost-unused include files.

* commit '82ab730688b8aa5290bdb3d4287e51d3c04f5c95':
DO NOT MERGE: Remove two almost-unused include files.
1600eb0c6dd258e4be4d3107c2ed36ea8683ff66 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am c8e4bda5: am 56ec161d: Mark unused parameters and set -Wunused-parameter

* commit 'c8e4bda513829c32ce0c6bc8e42210536d3e298f':
Mark unused parameters and set -Wunused-parameter
c8e4bda513829c32ce0c6bc8e42210536d3e298f 11-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 56ec161d: Mark unused parameters and set -Wunused-parameter

* commit '56ec161d47856212008f47676577882f30853312':
Mark unused parameters and set -Wunused-parameter
6f4f68a9720b92d1640ff8c48efc6bb4d0a9ae83 10-Mar-2014 Colin Cross <ccross@android.com> resolved conflicts for merge of fbef82d1 to klp-dev-plus-aosp

Change-Id: I7ec85f26fc1f94324fbb57c031d760098d2f76cb
4bfeea4473b710fa78992e392748e0e03879d9d6 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am af61fbf3: Merge "Revert "DO NOT MERGE: Remove two almost-unused include files."" into klp-dev

* commit 'af61fbf387c183caec7da2c59f474f515f7bb6af':
Revert "DO NOT MERGE: Remove two almost-unused include files."
09e22b0ecfde3e97f28d64088517bc9ce0945537 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 86e9cf0f: Merge "Revert "DO NOT MERGE: Remove unused variables"" into klp-dev

* commit '86e9cf0f703ad94ed6cbf4d09132f6f15f0d31e8':
Revert "DO NOT MERGE: Remove unused variables"
b7771bdf803b4e7ad6905447ca8bb5d1fb513955 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 3d2fc269: Merge "Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror"" into klp-dev

* commit '3d2fc2698608ff005d822470d07b31ec4e4f7528':
Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror"
46f0832b7a91b5013e84d0debeec46b1ef48c812 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am ad21a1f6: Merge "Revert "DO NOT MERGE: Add generic IP packet code and use it for GRE."" into klp-dev

* commit 'ad21a1f63cbc6a0ef5d207c4bab38171bfcecd76':
Revert "DO NOT MERGE: Add generic IP packet code and use it for GRE."
47c8bf17870521ab475d5bcd6275d5016d444e15 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am a24fc7c5: Merge "Revert "DO NOT MERGE: Fix up checksums instead of recalculating them."" into klp-dev

* commit 'a24fc7c545c22b0413fc324ecde96721b5a49b30':
Revert "DO NOT MERGE: Fix up checksums instead of recalculating them."
7d2b5ba9cecefde4c42b32241cd5ee48fdd709f2 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 92ea2c90: Merge "Revert "DO NOT MERGE: Move translation entry point into translate.c."" into klp-dev

* commit '92ea2c903242517929aab383c23b89478b444644':
Revert "DO NOT MERGE: Move translation entry point into translate.c."
bab813b9bb60df3f2ab5d205d2ccc2c4b8e60322 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 90fd3c91: Merge "Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."" into klp-dev

* commit '90fd3c919a841d1621a69b1f9a7e7fef1ad0a13a':
Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."
1b386c3c7e7c9458944d9674be7eff9cd3e313a0 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 2636ea7d: Revert "DO NOT MERGE: Support translating fragmented packets."

* commit '2636ea7d40cb9ac04571d580df62e2ebfe269d7d':
Revert "DO NOT MERGE: Support translating fragmented packets."
661d69f238b9da6a2c2eaec937cf90812229c4d4 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 866b4af1: DO NOT MERGE: Support translating fragmented packets.

* commit '866b4af18d8e9ef1020adc9accbb9f9de4c873dc':
DO NOT MERGE: Support translating fragmented packets.
14284bd8ef13e295048eca1b5c56e0d7fc65be90 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am fea4efa3: DO NOT MERGE: Modify the pseudo-header checksum functions.

* commit 'fea4efa398ff9c86c300f0c1be92611d1d1fd5ba':
DO NOT MERGE: Modify the pseudo-header checksum functions.
137709360f115ac8178dade70b1c3b54f096fca5 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 6c9862b6: DO NOT MERGE: Move translation entry point into translate.c.

* commit '6c9862b607a198cfd1ee0141e4a19fcaafdff729':
DO NOT MERGE: Move translation entry point into translate.c.
977ce6ec11caf435fd9ce13320a7f1862bb14eeb 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 489e1089: DO NOT MERGE: Fix up checksums instead of recalculating them.

* commit '489e108988036facb25c59d59eb5250cf076fd3a':
DO NOT MERGE: Fix up checksums instead of recalculating them.
a806ab19bd360e74a9b366dd6d57de5568644675 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of f10644ce to klp-dev-plus-aosp

Change-Id: Ibee9c6e2160e8ac7b5a998ea791f461b3182f39b
0848a670d54bf012cd06b094b4317dc1153604c1 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of d0024fbd to klp-dev-plus-aosp

Change-Id: I90bf736348bd42263d7f9b395cd01264872c1519
58573433be398cb94e82001aa607751ffd74423c 10-Mar-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> am cb72f364: DO NOT MERGE: Remove unused variables

* commit 'cb72f3643f475b70089e79108e16621787262e2b':
DO NOT MERGE: Remove unused variables
2b4cc7393268622ac3de071435a6e4ab857342df 09-Feb-2014 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Support translating fragmented packets.

Bug: 11542311
Change-Id: I5dd29805e12b919ae3105b6128aaedefd7e78b48
latd.c
ump.c
pv4.c
pv6.c
ranslate.c
ranslate.h
13a58c4859164d9f16e124b0f85c35a061dec76d 20-Feb-2014 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Modify the pseudo-header checksum functions.

- 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
hecksum.c
hecksum.h
ump.c
pv4.c
pv6.c
f0029d7d06cc8401686ddf379a609b29f511f1a5 12-Feb-2014 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: 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: I821bb9590b9105ea1d425c3bbe0e634c4ce667b5
latd.c
latd.h
pv4.c
pv6.c
ranslate.c
ranslate.h
c1be4799c39775fecb004d92687fe95298cac380 10-Feb-2014 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Fix up checksums instead of recalculating them.

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
hecksum.c
hecksum.h
pv4.c
pv6.c
ranslate.c
ranslate.h
57bcefd5920c330f03aa76329b9f97f3f1e841ac 17-Nov-2013 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Add generic IP packet code and use it for GRE.

Bug: 11542311
Change-Id: I91040f35814bd7b23288228a7fdf80f1be2f5a04
pv4.c
pv6.c
ranslate.c
ranslate.h
c2549b4b4e2437aca29497c29ebe0b17b6214549 18-Nov-2013 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror

Change-Id: I4eb9eb407500893a27745ed2df6da9a378ddb159
ndroid.mk
latd.c
pv6.c
ranslate.c
ranslate.h
72f3126f6499cd9017b367f5c7e61cab1d99d080 12-Dec-2013 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> DO NOT MERGE: Remove unused variables

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>
latd.c
onfig.c
cmp.c
pv6.c
ranslate.c
82ab730688b8aa5290bdb3d4287e51d3c04f5c95 18-Nov-2013 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Remove two almost-unused include files.

This fixes a compiler warning.

Change-Id: I7f4a866fd5a65a64861fe22e9d32a1a8b8e9758d
latd.c
pv4.c
pv4.h
pv6.c
pv6.h
ranslate.h
56ec161d47856212008f47676577882f30853312 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Mark unused parameters and set -Wunused-parameter

This allows us to compile with -Wall -Werror in build
environments where -Wall also warns about unused parameters.
Also explicitly set -Wunused-parameter so unused parameters will
cause the build to fail in environments where -Wall does not warn
about them.

Change-Id: Icccf2121d2a9df77b1c224c4976cb9aec56496b3
ndroid.mk
etaddr.c
etroute.c
ogging.c
etlink_callbacks.c
02eea9359f56ed674153a40b64c2432531754a1f 10-Mar-2014 Lorenzo Colitti <lorenzo@google.com> resolved conflicts for merge of 86cb1ac3 to klp-dev-plus-aosp

Change-Id: Icdd847ea5c42560cc564cf7b250bf6aefff279aa
3810aeb2a56b3a5f3adaa3cd010a09f9e9940235 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am a411fcb1: (-s ours) am 77a24d69: am af61fbf3: (-s ours) Merge "Revert "DO NOT MERGE: Remove two almost-unused include files."" into klp-dev

* commit 'a411fcb1802f6c08ccde4aa905d157f15396cfc3':
Revert "DO NOT MERGE: Remove two almost-unused include files."
84d2c13868eb2ba9decd9c320a123939fffdc173 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am edee2108: (-s ours) am 0297d430: am 86e9cf0f: (-s ours) Merge "Revert "DO NOT MERGE: Remove unused variables"" into klp-dev

* commit 'edee21088dabbd34b02d8940ba705fcda1f22e2b':
Revert "DO NOT MERGE: Remove unused variables"
a411fcb1802f6c08ccde4aa905d157f15396cfc3 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 77a24d69: am af61fbf3: (-s ours) Merge "Revert "DO NOT MERGE: Remove two almost-unused include files."" into klp-dev

* commit '77a24d6949e7897944f526d6ee4361e66893277b':
Revert "DO NOT MERGE: Remove two almost-unused include files."
fcf67ef3fb0d61e9ed44396e1f4ce4a2158ae4b4 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am b6571f37: (-s ours) am 24fda854: am 3d2fc269: (-s ours) Merge "Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror"" into klp-dev

* commit 'b6571f37eebb82623be68471a57eb759ff9c0000':
Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror"
edee21088dabbd34b02d8940ba705fcda1f22e2b 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 0297d430: am 86e9cf0f: (-s ours) Merge "Revert "DO NOT MERGE: Remove unused variables"" into klp-dev

* commit '0297d4300c1fe16ebae329c4d5350d9166261b07':
Revert "DO NOT MERGE: Remove unused variables"
ee28612789cf372137d57cec15ecf09d8b5d6a41 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 47c6bc46: (-s ours) am 1750e12b: am ad21a1f6: (-s ours) Merge "Revert "DO NOT MERGE: Add generic IP packet code and use it for GRE."" into klp-dev

* commit '47c6bc4613aa83b6ed3576c438543ec6a0276215':
Revert "DO NOT MERGE: Add generic IP packet code and use it for GRE."
c7705e6b5785c27fa830b6dda05984a595547b58 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 3ebf4b23: (-s ours) am 191c472e: am a24fc7c5: (-s ours) Merge "Revert "DO NOT MERGE: Fix up checksums instead of recalculating them."" into klp-dev

* commit '3ebf4b23e0080b24c6376cd481a4da9d57d001a4':
Revert "DO NOT MERGE: Fix up checksums instead of recalculating them."
77a24d6949e7897944f526d6ee4361e66893277b 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am af61fbf3: (-s ours) Merge "Revert "DO NOT MERGE: Remove two almost-unused include files."" into klp-dev

* commit 'af61fbf387c183caec7da2c59f474f515f7bb6af':
Revert "DO NOT MERGE: Remove two almost-unused include files."
0297d4300c1fe16ebae329c4d5350d9166261b07 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 86e9cf0f: (-s ours) Merge "Revert "DO NOT MERGE: Remove unused variables"" into klp-dev

* commit '86e9cf0f703ad94ed6cbf4d09132f6f15f0d31e8':
Revert "DO NOT MERGE: Remove unused variables"
b6571f37eebb82623be68471a57eb759ff9c0000 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 24fda854: am 3d2fc269: (-s ours) Merge "Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror"" into klp-dev

* commit '24fda8547ee6f74d2b712e75f9679b16aa9130d5':
Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror"
47c6bc4613aa83b6ed3576c438543ec6a0276215 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 1750e12b: am ad21a1f6: (-s ours) Merge "Revert "DO NOT MERGE: Add generic IP packet code and use it for GRE."" into klp-dev

* commit '1750e12b7d5a9ce9fd916130cd11a4ddf0c0237d':
Revert "DO NOT MERGE: Add generic IP packet code and use it for GRE."
3ebf4b23e0080b24c6376cd481a4da9d57d001a4 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 191c472e: am a24fc7c5: (-s ours) Merge "Revert "DO NOT MERGE: Fix up checksums instead of recalculating them."" into klp-dev

* commit '191c472e6c98446cde8169533c7b3804728c1011':
Revert "DO NOT MERGE: Fix up checksums instead of recalculating them."
24fda8547ee6f74d2b712e75f9679b16aa9130d5 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 3d2fc269: (-s ours) Merge "Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror"" into klp-dev

* commit '3d2fc2698608ff005d822470d07b31ec4e4f7528':
Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror"
1750e12b7d5a9ce9fd916130cd11a4ddf0c0237d 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am ad21a1f6: (-s ours) Merge "Revert "DO NOT MERGE: Add generic IP packet code and use it for GRE."" into klp-dev

* commit 'ad21a1f63cbc6a0ef5d207c4bab38171bfcecd76':
Revert "DO NOT MERGE: Add generic IP packet code and use it for GRE."
191c472e6c98446cde8169533c7b3804728c1011 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am a24fc7c5: (-s ours) Merge "Revert "DO NOT MERGE: Fix up checksums instead of recalculating them."" into klp-dev

* commit 'a24fc7c545c22b0413fc324ecde96721b5a49b30':
Revert "DO NOT MERGE: Fix up checksums instead of recalculating them."
af61fbf387c183caec7da2c59f474f515f7bb6af 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Revert "DO NOT MERGE: Remove two almost-unused include files."" into klp-dev
86e9cf0f703ad94ed6cbf4d09132f6f15f0d31e8 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Revert "DO NOT MERGE: Remove unused variables"" into klp-dev
3d2fc2698608ff005d822470d07b31ec4e4f7528 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror"" into klp-dev
01db71d930114e9a02a0cf319282e17dbf18f1d7 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am f2640bba: (-s ours) am 8d3807ed: am 92ea2c90: (-s ours) Merge "Revert "DO NOT MERGE: Move translation entry point into translate.c."" into klp-dev

* commit 'f2640bba5d92a65654fc60e8035f5597407a7930':
Revert "DO NOT MERGE: Move translation entry point into translate.c."
a2856c4e207fdfdcb76100ff61962660d6b2c82e 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am e57d26c8: (-s ours) am 81bada14: am 90fd3c91: (-s ours) Merge "Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."" into klp-dev

* commit 'e57d26c867717b72cd057fc4372bba5f39e6f59f':
Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."
07ba62f9d6e6ca754124d5804f5a997177ea951d 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 2deb2663: (-s ours) am a652d9b5: am 2636ea7d: (-s ours) Revert "DO NOT MERGE: Support translating fragmented packets."

* commit '2deb2663f688dc0244021f9965543da4a404df1e':
Revert "DO NOT MERGE: Support translating fragmented packets."
ad21a1f63cbc6a0ef5d207c4bab38171bfcecd76 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Revert "DO NOT MERGE: Add generic IP packet code and use it for GRE."" into klp-dev
a24fc7c545c22b0413fc324ecde96721b5a49b30 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Revert "DO NOT MERGE: Fix up checksums instead of recalculating them."" into klp-dev
f2640bba5d92a65654fc60e8035f5597407a7930 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 8d3807ed: am 92ea2c90: (-s ours) Merge "Revert "DO NOT MERGE: Move translation entry point into translate.c."" into klp-dev

* commit '8d3807ed48bcaf14232b06820e2eca741608de70':
Revert "DO NOT MERGE: Move translation entry point into translate.c."
e57d26c867717b72cd057fc4372bba5f39e6f59f 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 81bada14: am 90fd3c91: (-s ours) Merge "Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."" into klp-dev

* commit '81bada1438584324127eab362987a88ca76c15f3':
Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."
2deb2663f688dc0244021f9965543da4a404df1e 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am a652d9b5: am 2636ea7d: (-s ours) Revert "DO NOT MERGE: Support translating fragmented packets."

* commit 'a652d9b53edf855e969d930df838d69b1e84de1f':
Revert "DO NOT MERGE: Support translating fragmented packets."
8d3807ed48bcaf14232b06820e2eca741608de70 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 92ea2c90: (-s ours) Merge "Revert "DO NOT MERGE: Move translation entry point into translate.c."" into klp-dev

* commit '92ea2c903242517929aab383c23b89478b444644':
Revert "DO NOT MERGE: Move translation entry point into translate.c."
81bada1438584324127eab362987a88ca76c15f3 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 90fd3c91: (-s ours) Merge "Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."" into klp-dev

* commit '90fd3c919a841d1621a69b1f9a7e7fef1ad0a13a':
Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."
a652d9b53edf855e969d930df838d69b1e84de1f 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 2636ea7d: (-s ours) Revert "DO NOT MERGE: Support translating fragmented packets."

* commit '2636ea7d40cb9ac04571d580df62e2ebfe269d7d':
Revert "DO NOT MERGE: Support translating fragmented packets."
92ea2c903242517929aab383c23b89478b444644 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Revert "DO NOT MERGE: Move translation entry point into translate.c."" into klp-dev
90fd3c919a841d1621a69b1f9a7e7fef1ad0a13a 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."" into klp-dev
2636ea7d40cb9ac04571d580df62e2ebfe269d7d 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Revert "DO NOT MERGE: Support translating fragmented packets."

This reverts commit 866b4af18d8e9ef1020adc9accbb9f9de4c873dc.

Change-Id: I864dc0cbf3ad0dc04b86ed4e84a46aaf02778429
latd.c
ump.c
pv4.c
pv6.c
ranslate.c
ranslate.h
09c026be0c23e3ab8086603a73c5ec5ff2af92b5 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Revert "DO NOT MERGE: Modify the pseudo-header checksum functions."

This reverts commit fea4efa398ff9c86c300f0c1be92611d1d1fd5ba.

Change-Id: If8199246b3f921e862a5e5ca587d5120906946e0
hecksum.c
hecksum.h
ump.c
pv4.c
pv6.c
19b68f9d3969c17bdd3dfe608d4a89d6b201edef 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Revert "DO NOT MERGE: Move translation entry point into translate.c."

This reverts commit 6c9862b607a198cfd1ee0141e4a19fcaafdff729.

Change-Id: I4e55606814e650116e62ecb1f1d9a5a09c7ba2e0
latd.c
latd.h
pv4.c
pv6.c
ranslate.c
ranslate.h
adf87248150188a549dff15d843ce57ae7925b6f 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Revert "DO NOT MERGE: Fix up checksums instead of recalculating them."

This reverts commit 489e108988036facb25c59d59eb5250cf076fd3a.

Change-Id: I39e24afd8e9f1c862c0b7eea872c4fe31240aecf
hecksum.c
hecksum.h
pv4.c
pv6.c
ranslate.c
ranslate.h
5658b2563f0a939e424cd7ef34643cf5141a6bf1 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Revert "DO NOT MERGE: Add generic IP packet code and use it for GRE."

This reverts commit f10644ce653e130280e93da8a1096454a4d8d61a.

Change-Id: Id70d629038e5269c64580b9a89f35179bc7c6926
pv4.c
pv6.c
ranslate.c
ranslate.h
5b29cefbea5b612b8cfff4b60e7481185133d005 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Revert "DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror"

This reverts commit d0024fbd9285f473cd0053e4816393dbd0706b85.

Change-Id: I59201406f1f404b97c48877863835bdaeefc33e2
ndroid.mk
latd.c
pv6.c
ranslate.c
ranslate.h
88ee177670cc651784e1c58fac814202e63414ac 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Revert "DO NOT MERGE: Remove unused variables"

This reverts commit cb72f3643f475b70089e79108e16621787262e2b.

Change-Id: I10196a15fe92e281d4922f384f373a964ff703ec
latd.c
onfig.c
cmp.c
pv6.c
ranslate.c
f085c7aa127ca770f8ee16d9714e7504cffe6499 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> Revert "DO NOT MERGE: Remove two almost-unused include files."

This reverts commit 86cb1ac3d69805bebcac7a18b408d656603028f4.

Change-Id: If592b80e8107f468c2fe1caf00fcff49f25a9441
latd.c
pv4.c
pv4.h
pv6.c
pv6.h
ranslate.h
d51dc9cae13975a2ae75aff81a7dcff67a234a4f 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 52a7d24e: (-s ours) am b275f948: am 866b4af1: (-s ours) DO NOT MERGE: Support translating fragmented packets.

* commit '52a7d24e8b71d3ada01e5ee7815f513b00d398ca':
DO NOT MERGE: Support translating fragmented packets.
ce413c08830020418e99fc01a1436fab0cc81282 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 3451baaa: (-s ours) am 3819b2c4: am fea4efa3: (-s ours) DO NOT MERGE: Modify the pseudo-header checksum functions.

* commit '3451baaa6ccd8eef6e0033471510506e7e9cb8f3':
DO NOT MERGE: Modify the pseudo-header checksum functions.
1a40736e4aeb6ee029fccaf08356a004526c5b88 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 244b9ddc: (-s ours) am d9d7307a: am 6c9862b6: (-s ours) DO NOT MERGE: Move translation entry point into translate.c.

* commit '244b9ddc7c3ecf85cdf9da41a0969821b37ccb88':
DO NOT MERGE: Move translation entry point into translate.c.
01f875f9be80ba6e0b4cebc847ed23fe0112d837 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am b1f85476: (-s ours) am 12123e65: am 489e1089: (-s ours) DO NOT MERGE: Fix up checksums instead of recalculating them.

* commit 'b1f85476dd906655c085a0d6b5db75c264822386':
DO NOT MERGE: Fix up checksums instead of recalculating them.
caeed6fcfcd4c281603b0ac3b51185afeb2dac71 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am b568c280: (-s ours) am 1c6516fc: am f10644ce: (-s ours) DO NOT MERGE: Add generic IP packet code and use it for GRE.

* commit 'b568c280271204f8eeaec386f1e0da169115e0b9':
DO NOT MERGE: Add generic IP packet code and use it for GRE.
829afae04aefc94dab77a942387762f1684e1909 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 2765aae4: (-s ours) am a2b951c4: am d0024fbd: (-s ours) DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror

* commit '2765aae43c4638b1e1271b653783bbb6f6d80126':
DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror
bb04518fe219bde6dc666a22d5dcc314813bf0bf 08-Mar-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> am 9d1b1222: (-s ours) am 75a78bd9: am cb72f364: (-s ours) DO NOT MERGE: Remove unused variables

* commit '9d1b1222d288a2ab18870f47ed1fd8f91f5f171b':
DO NOT MERGE: Remove unused variables
8abec41991285e65cf47f9733af08c33920544e0 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 3856f721: (-s ours) am a4588101: am 86cb1ac3: (-s ours) DO NOT MERGE: Remove two almost-unused include files.

* commit '3856f721d7c7510aba92accc99d8b074318e02ac':
DO NOT MERGE: Remove two almost-unused include files.
52a7d24e8b71d3ada01e5ee7815f513b00d398ca 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am b275f948: am 866b4af1: (-s ours) DO NOT MERGE: Support translating fragmented packets.

* commit 'b275f94829823a63cb17a2c41548270cfb25088b':
DO NOT MERGE: Support translating fragmented packets.
3451baaa6ccd8eef6e0033471510506e7e9cb8f3 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 3819b2c4: am fea4efa3: (-s ours) DO NOT MERGE: Modify the pseudo-header checksum functions.

* commit '3819b2c4fbbb3e8d6c77a8d27b114e297dc43be3':
DO NOT MERGE: Modify the pseudo-header checksum functions.
b275f94829823a63cb17a2c41548270cfb25088b 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 866b4af1: (-s ours) DO NOT MERGE: Support translating fragmented packets.

* commit '866b4af18d8e9ef1020adc9accbb9f9de4c873dc':
DO NOT MERGE: Support translating fragmented packets.
3819b2c4fbbb3e8d6c77a8d27b114e297dc43be3 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am fea4efa3: (-s ours) DO NOT MERGE: Modify the pseudo-header checksum functions.

* commit 'fea4efa398ff9c86c300f0c1be92611d1d1fd5ba':
DO NOT MERGE: Modify the pseudo-header checksum functions.
244b9ddc7c3ecf85cdf9da41a0969821b37ccb88 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am d9d7307a: am 6c9862b6: (-s ours) DO NOT MERGE: Move translation entry point into translate.c.

* commit 'd9d7307a1a0d6c079b12f0164afc9871bfd7de08':
DO NOT MERGE: Move translation entry point into translate.c.
b1f85476dd906655c085a0d6b5db75c264822386 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 12123e65: am 489e1089: (-s ours) DO NOT MERGE: Fix up checksums instead of recalculating them.

* commit '12123e65f97b732c7b408211c19b9d6f2ffd5ab4':
DO NOT MERGE: Fix up checksums instead of recalculating them.
b568c280271204f8eeaec386f1e0da169115e0b9 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 1c6516fc: am f10644ce: (-s ours) DO NOT MERGE: Add generic IP packet code and use it for GRE.

* commit '1c6516fc6a4044f3cdcc4bd79d006379769059aa':
DO NOT MERGE: Add generic IP packet code and use it for GRE.
2765aae43c4638b1e1271b653783bbb6f6d80126 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am a2b951c4: am d0024fbd: (-s ours) DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror

* commit 'a2b951c4c9ca1210e942916bc890664149ee61d5':
DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror
9d1b1222d288a2ab18870f47ed1fd8f91f5f171b 08-Mar-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> am 75a78bd9: am cb72f364: (-s ours) DO NOT MERGE: Remove unused variables

* commit '75a78bd9206f0f4f2872544098ecb4ac40d70b31':
DO NOT MERGE: Remove unused variables
3856f721d7c7510aba92accc99d8b074318e02ac 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am a4588101: am 86cb1ac3: (-s ours) DO NOT MERGE: Remove two almost-unused include files.

* commit 'a4588101ddda9a427911b23cb19bd68eb4b32840':
DO NOT MERGE: Remove two almost-unused include files.
d9d7307a1a0d6c079b12f0164afc9871bfd7de08 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 6c9862b6: (-s ours) DO NOT MERGE: Move translation entry point into translate.c.

* commit '6c9862b607a198cfd1ee0141e4a19fcaafdff729':
DO NOT MERGE: Move translation entry point into translate.c.
12123e65f97b732c7b408211c19b9d6f2ffd5ab4 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 489e1089: (-s ours) DO NOT MERGE: Fix up checksums instead of recalculating them.

* commit '489e108988036facb25c59d59eb5250cf076fd3a':
DO NOT MERGE: Fix up checksums instead of recalculating them.
1c6516fc6a4044f3cdcc4bd79d006379769059aa 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am f10644ce: (-s ours) DO NOT MERGE: Add generic IP packet code and use it for GRE.

* commit 'f10644ce653e130280e93da8a1096454a4d8d61a':
DO NOT MERGE: Add generic IP packet code and use it for GRE.
a2b951c4c9ca1210e942916bc890664149ee61d5 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am d0024fbd: (-s ours) DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror

* commit 'd0024fbd9285f473cd0053e4816393dbd0706b85':
DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror
75a78bd9206f0f4f2872544098ecb4ac40d70b31 08-Mar-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> am cb72f364: (-s ours) DO NOT MERGE: Remove unused variables

* commit 'cb72f3643f475b70089e79108e16621787262e2b':
DO NOT MERGE: Remove unused variables
a4588101ddda9a427911b23cb19bd68eb4b32840 08-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 86cb1ac3: (-s ours) DO NOT MERGE: Remove two almost-unused include files.

* commit '86cb1ac3d69805bebcac7a18b408d656603028f4':
DO NOT MERGE: Remove two almost-unused include files.
866b4af18d8e9ef1020adc9accbb9f9de4c873dc 09-Feb-2014 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Support translating fragmented packets.

Bug: 11542311
Change-Id: I14a20b9ac669cdb5927f6ac26147bb0109099497
latd.c
ump.c
pv4.c
pv6.c
ranslate.c
ranslate.h
fea4efa398ff9c86c300f0c1be92611d1d1fd5ba 20-Feb-2014 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Modify the pseudo-header checksum functions.

- 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
hecksum.c
hecksum.h
ump.c
pv4.c
pv6.c
6c9862b607a198cfd1ee0141e4a19fcaafdff729 12-Feb-2014 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: 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
latd.c
latd.h
pv4.c
pv6.c
ranslate.c
ranslate.h
489e108988036facb25c59d59eb5250cf076fd3a 10-Feb-2014 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Fix up checksums instead of recalculating them.

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
hecksum.c
hecksum.h
pv4.c
pv6.c
ranslate.c
ranslate.h
f10644ce653e130280e93da8a1096454a4d8d61a 17-Nov-2013 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Add generic IP packet code and use it for GRE.

Bug: 11542311
Change-Id: I174e0b268869bc77927feeee57003580c47c30f2
pv4.c
pv6.c
ranslate.c
ranslate.h
d0024fbd9285f473cd0053e4816393dbd0706b85 18-Nov-2013 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Fix compiler warnings and enable -Wall -Werror

Change-Id: I24847fa35644d92bff0fe31ccfc5c4b3e8705779
ndroid.mk
latd.c
pv6.c
ranslate.c
ranslate.h
cb72f3643f475b70089e79108e16621787262e2b 12-Dec-2013 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> DO NOT MERGE: 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>
latd.c
onfig.c
cmp.c
pv6.c
ranslate.c
86cb1ac3d69805bebcac7a18b408d656603028f4 18-Nov-2013 Lorenzo Colitti <lorenzo@google.com> DO NOT MERGE: Remove two almost-unused include files.

This fixes a compiler warning.

Change-Id: I14b5d3c871e9b2fdc8400d999e76e494ad510328
latd.c
pv4.c
pv4.h
pv6.c
pv6.h
ranslate.h
5bef5b0af94074a1e7d25b47331ca8c1b42c940c 08-Mar-2014 JP Abgrall <jpa@google.com> am f2cd5b2f: am c00515e6: am ade83087: Add ip6 dummy address to keep data usage stats consistent.

* commit 'f2cd5b2ff6590c9b8fc23a3ef5c86cbecae62b17':
Add ip6 dummy address to keep data usage stats consistent.
2af3f0ff50977c38922336f03adbb8af66c73069 08-Mar-2014 JP Abgrall <jpa@google.com> am ade83087: Add ip6 dummy address to keep data usage stats consistent.

* commit 'ade83087bae9575d3c61f39fba1ffad6442f2d56':
Add ip6 dummy address to keep data usage stats consistent.
f2cd5b2ff6590c9b8fc23a3ef5c86cbecae62b17 08-Mar-2014 JP Abgrall <jpa@google.com> am c00515e6: am ade83087: Add ip6 dummy address to keep data usage stats consistent.

* commit 'c00515e6fa28130414a9f1b2dcb220ea5a091ae5':
Add ip6 dummy address to keep data usage stats consistent.
c00515e6fa28130414a9f1b2dcb220ea5a091ae5 08-Mar-2014 JP Abgrall <jpa@google.com> am ade83087: Add ip6 dummy address to keep data usage stats consistent.

* commit 'ade83087bae9575d3c61f39fba1ffad6442f2d56':
Add ip6 dummy address to keep data usage stats consistent.
19635002f3109271dfe492f595c9b18c52efe788 07-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am f9390605: Move translation entry point into translate.c.

* commit 'f9390605bacda7bbe8ea33aa0a39c1581ff6aea2':
Move translation entry point into translate.c.
49da0bfda1e08429d4461521e511c63153f809d7 07-Mar-2014 Lorenzo Colitti <lorenzo@google.com> am 5a50c028: Fix up checksums instead of recalculating them.

* commit '5a50c0283346a197cda7af19e68f611f14b8fe57':
Fix up checksums instead of recalculating them.
ade83087bae9575d3c61f39fba1ffad6442f2d56 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
latd.c
latd.conf
onfig.c
onfig.h
091ba68f6e6262b18a2a887d7f6b844377fc9905 27-Feb-2014 Elliott Hughes <enh@google.com> am ca91f8d0: am d6c9bc21: TARGET_SIMULATOR is long dead.

* commit 'ca91f8d02e9625333884bba1dd44ed4d2502787c':
TARGET_SIMULATOR is long dead.
ca91f8d02e9625333884bba1dd44ed4d2502787c 27-Feb-2014 Elliott Hughes <enh@google.com> am d6c9bc21: TARGET_SIMULATOR is long dead.

* commit 'd6c9bc21e673110aec61157419964b2e57c16078':
TARGET_SIMULATOR is long dead.
d6c9bc21e673110aec61157419964b2e57c16078 27-Feb-2014 Elliott Hughes <enh@google.com> TARGET_SIMULATOR is long dead.

Change-Id: I1ece12aac233888c3f0dec8f0beb5a20417a4286
ndroid.mk
09f394a00af15f542891eab8517b7ced304b3908 26-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am 362797c9: am a4454bfd: Declare pos as clat_packet_index instead of int

* commit '362797c9c67e6dd3ab86fbbde5594fc18d395bde':
Declare pos as clat_packet_index instead of int
362797c9c67e6dd3ab86fbbde5594fc18d395bde 26-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am a4454bfd: Declare pos as clat_packet_index instead of int

* commit 'a4454bfda99803c287b78f8d1cd7bdc1b56065db':
Declare pos as clat_packet_index instead of int
0621d4e6af0ead184c71eeaa20a057369763dd7b 25-Feb-2014 Brian Carlstrom <bdc@google.com> am 901fb4de: am fcac410f: Use uint8_t not char for binary data to avoid -Wall -Werror issues on x86 builds

* commit '901fb4deec7e94e0825511c1ad052d7d08c9d8f9':
Use uint8_t not char for binary data to avoid -Wall -Werror issues on x86 builds
901fb4deec7e94e0825511c1ad052d7d08c9d8f9 25-Feb-2014 Brian Carlstrom <bdc@google.com> am fcac410f: Use uint8_t not char for binary data to avoid -Wall -Werror issues on x86 builds

* commit 'fcac410fa15613873a07143ccd46470b869346a3':
Use uint8_t not char for binary data to avoid -Wall -Werror issues on x86 builds
a4454bfda99803c287b78f8d1cd7bdc1b56065db 25-Feb-2014 Lorenzo Colitti <lorenzo@google.com> Declare pos as clat_packet_index instead of int

Bug: 11542311
Change-Id: Id5771c9685286b70a8ad283c259c7f83662e8b76
pv4.c
pv6.c
ranslate.c
ranslate.h
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
latd.c
latd_test.cpp
ump.c
ump.h
pv4.c
pv6.c
ranslate.c
ranslate.h
66be9c34ec2847384d198369b617dca7010ced3a 25-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am 1bbbbaa3: am f3beefc9: Add a unit test for 464xlat translation code.

* commit '1bbbbaa3cabe7c539bab1644cb0cc92285904855':
Add a unit test for 464xlat translation code.
18ad3ebaf694d0c6f849c9f63bb41a7a390170a8 25-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am 711e2603: am 57d480d2: Support translating fragmented packets.

* commit '711e2603790d019f97434fac8b623f66806720d3':
Support translating fragmented packets.
1bbbbaa3cabe7c539bab1644cb0cc92285904855 25-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am f3beefc9: Add a unit test for 464xlat translation code.

* commit 'f3beefc96a5a4f295562f60d648bd6e795980a10':
Add a unit test for 464xlat translation code.
711e2603790d019f97434fac8b623f66806720d3 25-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am 57d480d2: Support translating fragmented packets.

* commit '57d480d2b425ef20d8b6f84abd4e9e3209fa9422':
Support translating fragmented packets.
188d3d8c5fcf11637469578667b0e1c877b1cc7d 22-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am 51d8f1e3: am 07f02658: Modify the pseudo-header checksum functions.

* commit '51d8f1e33d5007511bf410ce9a3ea7f3ad09511b':
Modify the pseudo-header checksum functions.
51d8f1e33d5007511bf410ce9a3ea7f3ad09511b 22-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am 07f02658: Modify the pseudo-header checksum functions.

* commit '07f0265830fcae2632159e9993b93a161d7ea23b':
Modify the pseudo-header checksum functions.
f3beefc96a5a4f295562f60d648bd6e795980a10 14-Feb-2014 Lorenzo Colitti <lorenzo@google.com> Add a unit test for 464xlat translation code.

Bug: 11542311
Change-Id: Ibc7f156a6abb96c9bf4983ecd63b052fe308e422
ndroid.mk
latd_test.cpp
9f6a88ed6be9320183e13b4f12e7b338178a2f2d 22-Feb-2014 Colin Cross <ccross@android.com> am 17bbf646: am fbef82d1: android-clat: link against libnl instead of libnl_2

* commit '17bbf646357dc206ca672cc3f50dd0106437023f':
android-clat: link against libnl instead of libnl_2
57d480d2b425ef20d8b6f84abd4e9e3209fa9422 09-Feb-2014 Lorenzo Colitti <lorenzo@google.com> Support translating fragmented packets.

Bug: 11542311
Change-Id: I14a20b9ac669cdb5927f6ac26147bb0109099497
latd.c
ump.c
pv4.c
pv6.c
ranslate.c
ranslate.h
07f0265830fcae2632159e9993b93a161d7ea23b 20-Feb-2014 Lorenzo Colitti <lorenzo@google.com> Modify the pseudo-header checksum functions.

- 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
hecksum.c
hecksum.h
ump.c
pv4.c
pv6.c
17bbf646357dc206ca672cc3f50dd0106437023f 22-Feb-2014 Colin Cross <ccross@android.com> am fbef82d1: android-clat: link against libnl instead of libnl_2

* commit 'fbef82d10366495bbd0dbb30cea015cb67c8105a':
android-clat: link against libnl instead of libnl_2
fbef82d10366495bbd0dbb30cea015cb67c8105a 22-Feb-2014 Colin Cross <ccross@android.com> android-clat: link against libnl instead of libnl_2

Change-Id: Ida397d0e8f347a78fb25353ea38760f3b4b499a6
ndroid.mk
etlink_msg.c
etroute.c
532e39c784d1a71c1ae53bd2a2221aaeca969ca4 20-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am 4e07ab06: am f9390605: Move translation entry point into translate.c.

* commit '4e07ab06af07771c9d283880bb1274c96fd34f21':
Move translation entry point into translate.c.
4e07ab06af07771c9d283880bb1274c96fd34f21 20-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am f9390605: Move translation entry point into translate.c.

* commit 'f9390605bacda7bbe8ea33aa0a39c1581ff6aea2':
Move translation entry point into translate.c.
33d899e3085bc98e05ecd540e921977a39ed605f 14-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am 8a77d03f: am 5a50c028: Fix up checksums instead of recalculating them.

* commit '8a77d03f0cdd4597e7036d67dba2e56ff7ddf384':
Fix up checksums instead of recalculating them.
8a77d03f0cdd4597e7036d67dba2e56ff7ddf384 14-Feb-2014 Lorenzo Colitti <lorenzo@google.com> am 5a50c028: Fix up checksums instead of recalculating them.

* commit '5a50c0283346a197cda7af19e68f611f14b8fe57':
Fix up checksums instead of recalculating them.
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
latd.c
latd.h
pv4.c
pv6.c
ranslate.c
ranslate.h
5a50c0283346a197cda7af19e68f611f14b8fe57 10-Feb-2014 Lorenzo Colitti <lorenzo@google.com> Fix up checksums instead of recalculating them.

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
hecksum.c
hecksum.h
pv4.c
pv6.c
ranslate.c
ranslate.h
01d6d0da5e55afb2ef56f7382dd94f886cbed599 03-Jan-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> am b9949a30: am a33592bd: Remove unused variables

* commit 'b9949a303e9dab8821e17129b7cede19a28b9519':
Remove unused variables
b9949a303e9dab8821e17129b7cede19a28b9519 03-Jan-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> am a33592bd: Remove unused variables

* commit 'a33592bd08a20c6a521b8508975b7a74ecdf4f03':
Remove unused variables
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>
latd.c
onfig.c
cmp.c
pv6.c
ranslate.c
10b92ae12477e989ef70f5b5203596371d9c54ef 26-Dec-2013 JP Abgrall <jpa@google.com> am 05f9615b: am 4e0dd836: Add ip6 dummy address to keep data usage stats consistent.

* commit '05f9615bd8b47a7c0f957ec90b53503dbc38f535':
Add ip6 dummy address to keep data usage stats consistent.
05f9615bd8b47a7c0f957ec90b53503dbc38f535 26-Dec-2013 JP Abgrall <jpa@google.com> am 4e0dd836: Add ip6 dummy address to keep data usage stats consistent.

* commit '4e0dd83686869c292e162dc76992863d3f3a3c38':
Add ip6 dummy address to keep data usage stats consistent.
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
latd.c
latd.conf
onfig.c
onfig.h
a94a1a921bba6303cb7414627cb127af859a2d9b 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
latd.c
latd.conf
onfig.c
onfig.h
454effd5b3a1c771b153063cada22b1aa2a22d94 26-Nov-2013 Lorenzo Colitti <lorenzo@google.com> am c9f4c89d: Add generic IP packet code and use it for GRE.

* commit 'c9f4c89da6c76ebc59a0ec1047853a13ce5f5d96':
Add generic IP packet code and use it for GRE.
c9f4c89da6c76ebc59a0ec1047853a13ce5f5d96 17-Nov-2013 Lorenzo Colitti <lorenzo@google.com> Add generic IP packet code and use it for GRE.

Bug: 11542311
Change-Id: I174e0b268869bc77927feeee57003580c47c30f2
pv4.c
pv6.c
ranslate.c
ranslate.h
8c5f93bc33e27253c9f88db97e673223d64583f8 25-Nov-2013 Lorenzo Colitti <lorenzo@google.com> am 9fe1673c: Merge "Use ipv4only.arpa for DNS64 detection."

* commit '9fe1673c316988d0fb8dd85e9d86642e0ac6d1b4':
Use ipv4only.arpa for DNS64 detection.
9fe1673c316988d0fb8dd85e9d86642e0ac6d1b4 25-Nov-2013 Lorenzo Colitti <lorenzo@google.com> Merge "Use ipv4only.arpa for DNS64 detection."
54ee8c085a0902ae12c24ec4ee7dead57686b2ee 23-Nov-2013 The Android Open Source Project <initial-contribution@android.com> am 7a661172: Merge commit \'4d1860573a663ed47ea1f847774a1e3315649e07\' into HEAD

* commit '7a66117202f62dd988eee2465d72e243243f341b':
7a66117202f62dd988eee2465d72e243243f341b 22-Nov-2013 The Android Open Source Project <initial-contribution@android.com> Merge commit '4d1860573a663ed47ea1f847774a1e3315649e07' into HEAD
dda30aff7e48e27013e8d95ea489a61c1005af55 21-Nov-2013 Lorenzo Colitti <lorenzo@google.com> am 9477a464: Fix compiler warnings and enable -Wall -Werror

* commit '9477a464bd70849bcddcb8d11613cff117235cb0':
Fix compiler warnings and enable -Wall -Werror
dfb4c97aa9a79db59e86d5e1f7249b9ee6162015 21-Nov-2013 Lorenzo Colitti <lorenzo@google.com> am 07fc7614: Remove two almost-unused include files.

* commit '07fc7614a14f024857fcb4880b308df6e8c297d0':
Remove two almost-unused include files.
12c72b23e469e9c95e28fcd19be98c688f0ee3d7 21-Nov-2013 Lorenzo Colitti <lorenzo@google.com> Use ipv4only.arpa for DNS64 detection.

We currently use DNS lokoups to ipv4.google.com to do DNS64
detection. Now that RFC 7050 has been published and
ipv4only.arpa has been published by IANA, switch to using that.

Change-Id: Ia9ebc5db77364104f5888edb53468d29dc618d34
latd.conf
9477a464bd70849bcddcb8d11613cff117235cb0 18-Nov-2013 Lorenzo Colitti <lorenzo@google.com> Fix compiler warnings and enable -Wall -Werror

Change-Id: I24847fa35644d92bff0fe31ccfc5c4b3e8705779
ndroid.mk
latd.c
pv6.c
ranslate.c
ranslate.h
07fc7614a14f024857fcb4880b308df6e8c297d0 18-Nov-2013 Lorenzo Colitti <lorenzo@google.com> Remove two almost-unused include files.

This fixes a compiler warning.

Change-Id: I14b5d3c871e9b2fdc8400d999e76e494ad510328
latd.c
pv4.c
pv4.h
pv6.c
pv6.h
ranslate.h
4d1860573a663ed47ea1f847774a1e3315649e07 11-Jul-2013 The Android Open Source Project <initial-contribution@android.com> am 3b0d387b: (-s ours) Reconcile with jb-mr2-release - do not merge

* commit '3b0d387b0573657358c24208c8e201d377311132':
Remove debug tag from the clatd.conf build target
3b0d387b0573657358c24208c8e201d377311132 10-Jul-2013 The Android Open Source Project <initial-contribution@android.com> Reconcile with jb-mr2-release - do not merge

Change-Id: Iaed3507a353fc057c8cc2bba136a043d61bc9e96
815d325bd3f2e0afdad4dd396aa0df6e0e60c84c 08-Jul-2013 Lorenzo Colitti <lorenzo@google.com> Remove debug tag from the clatd.conf build target

Bug: 9730936
Change-Id: I2c50422c7b502d5b9bdc01afb55d25353f6c7088
ndroid.mk
b922c820c007b0227480117a29e7cc797cd650c8 08-Jul-2013 Lorenzo Colitti <lorenzo@google.com> am 0d7837b9: Remove debug tag from the clatd.conf build target

* commit '0d7837b9dddce300713bfcf2b84aecf2e360a502':
Remove debug tag from the clatd.conf build target
0d7837b9dddce300713bfcf2b84aecf2e360a502 08-Jul-2013 Lorenzo Colitti <lorenzo@google.com> Remove debug tag from the clatd.conf build target

Bug: 9730936
Change-Id: I2c50422c7b502d5b9bdc01afb55d25353f6c7088
ndroid.mk
2c7b747d57fb07b5aef381554989ffb59ec34afe 08-Jul-2013 Lorenzo Colitti <lorenzo@google.com> Remove debug tag from the clatd.conf build target

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
ndroid.mk
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
ndroid.mk
latd.c
cmp.c
cmp.h
pv6.c
ranslate.c
ranslate.h
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
latd.c
pv4.c
pv6.c
ranslate.c
ranslate.h
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
latd.c
latd.h
ump.c
pv4.c
pv4.h
pv6.c
pv6.h
ranslate.c
ranslate.h
0aff5c273daa16e5af234a904ba4a9cf6dc414a6 12-Apr-2013 Lorenzo Colitti <lorenzo@google.com> Merge "Treat the options as part of the TCP header." into jb-mr2-dev
5cc877d4fc20d66ca5a057a3dc445adb998409bd 08-Apr-2013 Lorenzo Colitti <lorenzo@google.com> Treat the options as part of the TCP header.

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
pv4.c
pv6.c
ranslate.c
ranslate.h
b3cc9f307610901b3d8caf422592b94868028265 11-Apr-2013 Lorenzo Colitti <lorenzo@google.com> Merge "Slightly improve dumping packets" into jb-mr2-dev
630b1cb496706d53873f645c62b6c474a41a8952 11-Apr-2013 Lorenzo Colitti <lorenzo@google.com> Merge "Pass in the length to pseudo checksum functions" into jb-mr2-dev
f110707de9dd80288e128fbcf73a0e572977b762 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: I22d0f0a30e5e42ff0c68805703747dd46ccf4fb6
ndroid.mk
f913fe49272286a7f1e58d94a208b6dc06a51fd2 08-Apr-2013 Lorenzo Colitti <lorenzo@google.com> Slightly improve dumping packets

Add a function for dumping iovecs, and make hexdumps clearer by
adding spaces between bytes.

Bug: 8276725
Change-Id: Ifb2f8317613d05fa6bd600700090a6df258cde08
ump.c
ump.h
0278627f576832860af2d84e04e383ecaa92d74f 08-Apr-2013 Lorenzo Colitti <lorenzo@google.com> Pass in the length to pseudo checksum functions

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
hecksum.c
hecksum.h
ump.c
ranslate.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
latd.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
latd.c
f2d2abde321c3b2d35edc2436be83611a75c576e 16-Mar-2013 Lorenzo Colitti <lorenzo@google.com> Remove debug tag, as clatd is now built by default

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
ndroid.mk
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
latd.c
etroute.c
etroute.h
1373eac3f8305f6ad834ba8e3fc4f1a75cd8ac5a 04-Mar-2013 Lorenzo Colitti <lorenzo@google.com> Stop setting accept_ra, now that netd does it.

Bug: 8276725
Change-Id: Iedbd34bc94f678afe51429078e6c06ff144e6373
latd.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
latd.c
ns64.c
2edb7567d3d5373617c236801766e928c6a3dbcb 28-Feb-2013 Nick Kralevich <nnk@google.com> clatd: use correct header file.

Change-Id: I8e7130c1c9b7d6397bc5e705e58667fb7b37b598
latd.c
d6ef91bef28020ec019a64561e8fb5e353e42980 26-Feb-2013 Lorenzo Colitti <lorenzo@google.com> Change the IP addresses used by CLAT.

- 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
latd.conf
559230ca44fa6a468d465d932f143ce95d12ab4c 23-Feb-2013 Nick Kralevich <nnk@google.com> Merge "Ensure netlink messages come from the kernel."
4f3d78640de4573ced186edd3a09b1247d981edf 01-Feb-2013 Lorenzo Colitti <lorenzo@google.com> Ensure netlink messages come from the kernel.

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
etlink_msg.c
etlink_msg.h
f68200ab1a5c559866a87e51d0d52e3c74b02343 01-Feb-2013 Lorenzo Colitti <lorenzo@google.com> Don't compile packet dumping code by default.

Bug: 7664960

Change-Id: Ieb56bcc010d0e12264d43e0a0dfcb1beb479d4e2
ebug.h
ump.c
70aba57df0f4a0ee800e7ba3694dbd9b6302a470 14-Nov-2012 JP Abgrall <jpa@google.com> build and include for debug builds.

The builds the clatd and adds the needed conf file.

Change-Id: Idb45a7b8b712ffaedddee9f3ca73d44001eaba81
ndroid.mk
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>
ndroid.mk
UGS
ICENSE
ODULE_LICENSE_APACHE2
OTICE
hecksum.c
hecksum.h
latd.c
latd.conf
latd.h
onfig.c
onfig.h
ebug.h
ns64.c
ns64.h
ump.c
ump.h
etaddr.c
etaddr.h
etroute.c
etroute.h
pv4.c
pv4.h
pv6.c
pv6.h
ogging.c
ogging.h
tu.c
tu.h
etlink_callbacks.c
etlink_callbacks.h
etlink_msg.c
etlink_msg.h
etif.c
etif.h
etroute.c
etroute.h
ranslate.c
ranslate.h
62ea9b6658a4c2116eeb6450c8244269448e79aa 06-Mar-2012 Anatol Pomazau <anatol@google.com> Initial empty repository