summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Never use a statically-configured IID on wifi.android-cts-5.1_r9android-cts-5.1_r8android-cts-5.1_r7android-cts-5.1_r6android-cts-5.1_r5android-cts-5.1_r4android-cts-5.1_r3android-cts-5.1_r28android-cts-5.1_r27android-cts-5.1_r26android-cts-5.1_r25android-cts-5.1_r24android-cts-5.1_r23android-cts-5.1_r22android-cts-5.1_r21android-cts-5.1_r20android-cts-5.1_r2android-cts-5.1_r19android-cts-5.1_r18android-cts-5.1_r17android-cts-5.1_r16android-cts-5.1_r15android-cts-5.1_r14android-cts-5.1_r13android-cts-5.1_r10android-cts-5.1_r1android-5.1.1_r9android-5.1.1_r8android-5.1.1_r7android-5.1.1_r6android-5.1.1_r5android-5.1.1_r4android-5.1.1_r38android-5.1.1_r37android-5.1.1_r36android-5.1.1_r35android-5.1.1_r34android-5.1.1_r33android-5.1.1_r30android-5.1.1_r3android-5.1.1_r29android-5.1.1_r28android-5.1.1_r26android-5.1.1_r25android-5.1.1_r24android-5.1.1_r23android-5.1.1_r22android-5.1.1_r20android-5.1.1_r2android-5.1.1_r19android-5.1.1_r18android-5.1.1_r17android-5.1.1_r16android-5.1.1_r15android-5.1.1_r14android-5.1.1_r13android-5.1.1_r12android-5.1.1_r10android-5.1.1_r1android-5.1.0_r5android-5.1.0_r4android-5.1.0_r3android-5.1.0_r1lollipop-mr1-wfc-releaselollipop-mr1-releaselollipop-mr1-fi-releaselollipop-mr1-devlollipop-mr1-cts-releaseLorenzo Colitti2014-11-104-2/+22
| | | | | Bug: 12111730 Change-Id: I062d81f2b65e6e89baae0f840cbd673f8051d523
* Use different IPv4 addresses on different clat interfaces.Lorenzo Colitti2014-11-015-5/+154
| | | | | | | | | | | | | 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
* Support 464xlat on broadcast interfaces such as wifi.Lorenzo Colitti2014-10-293-0/+58
| | | | | | | | 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
* Unduplicate IPv6 address setting code.Lorenzo Colitti2014-10-293-76/+59
| | | | | | | | | 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
* Support more than one clatd at a time.Lorenzo Colitti2014-10-282-7/+12
| | | | | | | | | 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
* Generate a random IID if one is not specified.Lorenzo Colitti2014-10-287-20/+270
| | | | | | | | | | | | | - 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
* Cleanup: Remove unused "ipv6_local_address".Sreeram Ramachandran2014-10-273-12/+3
| | | | | | | | | | | 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
* Simplify and always retry DNS64 prefix discovery.android-cts-5.0_r9android-cts-5.0_r8android-cts-5.0_r7android-cts-5.0_r6android-cts-5.0_r5android-cts-5.0_r4android-cts-5.0_r3android-5.0.2_r3android-5.0.2_r1android-5.0.1_r1android-5.0.0_r7android-5.0.0_r6android-5.0.0_r5.1android-5.0.0_r5android-5.0.0_r4android-5.0.0_r3android-5.0.0_r2android-5.0.0_r1lollipop-releaselollipop-devlollipop-cts-releaseErik Kline2014-09-242-54/+24
| | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Call read on any event, not just on POLLIN.Lorenzo Colitti2014-08-252-11/+14
| | | | | | | | | | | | | | 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
* Remove unused #include.Elliott Hughes2014-07-181-1/+0
| | | | | | (cherry picked from commit 18921713780edb45ceef327d5fcf3387818300f3) Change-Id: I132f7a4ea1a73073fe22ca5f3d89644f2a302db3
* Fix implicit declaration of function 'prctl' in clatd.Elliott Hughes2014-07-181-0/+1
| | | | | | (cherry picked from commit 787ea96922dc3942946fd4ad1e0495d4e06e0c2f) Change-Id: I4582222c8576353b800cc7d30f16c5dbe5f2e8a9
* am 913e2e49: am 7045e27d: Create the tun device after dropping root privileges.Lorenzo Colitti2014-06-171-7/+8
|\ | | | | | | | | * commit '913e2e493b229493eb43a0e136c5c3f6b568b5de': Create the tun device after dropping root privileges.
| * am 7045e27d: Create the tun device after dropping root privileges.Lorenzo Colitti2014-06-171-7/+8
| |\ | | | | | | | | | | | | * commit '7045e27d4946330f3152218fdaa81b37d02b6d6c': Create the tun device after dropping root privileges.
| | * Create the tun device after dropping root privileges.Lorenzo Colitti2014-06-131-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 87342f29: am b9b471e1: Log unexpected arguments.Lorenzo Colitti2014-06-130-0/+0
|\| | | | | | | | | | | | | | * commit '87342f29a9bbf15db4867941e4d3bb2e4fd11053': Log unexpected arguments.
| * | am b9b471e1: Log unexpected arguments.Lorenzo Colitti2014-06-131-4/+7
| |\| | | | | | | | | | | | | * commit 'b9b471e1e3788a398adeb0a04bfc52d6ba7c3cf6': Log unexpected arguments.
| | * Log unexpected arguments.Lorenzo Colitti2014-06-131-4/+7
| | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 3e7b1d8f783320d38382089a3c9a790ba13772dc) Bug: 15340961 Change-Id: Iff172b066aa468f9ee36aab661a8b51cb03db95b
* | | am 522930f0: (-s ours) am 7564761e: Mark the raw socket used by clatd.Lorenzo Colitti2014-06-130-0/+0
|\| | | | | | | | | | | | | | * commit '522930f0659319bf8d3d22b72a7d68280de295fe': Mark the raw socket used by clatd.
| * | am 7564761e: Mark the raw socket used by clatd.Lorenzo Colitti2014-06-131-16/+40
| |\| | | | | | | | | | | | | * commit '7564761e2d98ce52a128b2338ec5edcd13aaed01': Mark the raw socket used by clatd.
| | * Mark the raw socket used by clatd.Lorenzo Colitti2014-06-131-16/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is required to use clatd on a non-default network. (cherry picked from commit 10c1adce5e85b429bf45bf7f0208c6c37245fbfb) Bug: 15340961 Change-Id: I779c83644727227a109bfeec1565364336b5ac2b
* | | am fa6e9d32: (-s ours) am f08c5aa6: Use a packet socket to receive packets.Lorenzo Colitti2014-06-130-0/+0
|\| | | | | | | | | | | | | | * commit 'fa6e9d325622d7a507b2e9d19e2e145647295ee6': Use a packet socket to receive packets.
| * | am f08c5aa6: Use a packet socket to receive packets.Lorenzo Colitti2014-06-139-463/+102
| |\| | | | | | | | | | | | | * commit 'f08c5aa666d170c17abb784081897ea169c1b67f': Use a packet socket to receive packets.
| | * Use a packet socket to receive packets.Lorenzo Colitti2014-06-139-463/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am ffe528a9: (-s ours) am ce14088b: Use a raw socket to send IPv6 packets ↵Lorenzo Colitti2014-06-130-0/+0
|\| | | | | | | | | | | | | | | | | | | | instead of a tun. * commit 'ffe528a969017b7d1687528ddf580395e54fb99d': Use a raw socket to send IPv6 packets instead of a tun.
| * | am ce14088b: Use a raw socket to send IPv6 packets instead of a tun.Lorenzo Colitti2014-06-134-24/+84
| |\| | | | | | | | | | | | | * commit 'ce14088b80c2d22add83a616e567f9025d252ef7': Use a raw socket to send IPv6 packets instead of a tun.
| | * Use a raw socket to send IPv6 packets instead of a tun.Lorenzo Colitti2014-06-134-24/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow us to bind the socket to a particular network. (cherry picked from commit 10e8827d636a72a7bcdfd52d15bad9342ae2a0a6) Bug: 15340961 Change-Id: I0b62ef96364a90b9c0a9e3ac3ba97b5c19c89b69
* | | am d3edb277: (-s ours) am e24982ea: Make translate_packet take a fd instead ↵Lorenzo Colitti2014-06-130-0/+0
|\| | | | | | | | | | | | | | | | | | | | of a tun header. * commit 'd3edb2776e549f0952332055401ab4c5d743695c': Make translate_packet take a fd instead of a tun header.
| * | am e24982ea: Make translate_packet take a fd instead of a tun header.Lorenzo Colitti2014-06-134-28/+31
| |\| | | | | | | | | | | | | * commit 'e24982ea3a4480d9d62c75b4d9a416b9479f7f0b': Make translate_packet take a fd instead of a tun header.
| | * Make translate_packet take a fd instead of a tun header.Lorenzo Colitti2014-06-134-28/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 0c41b16c: (-s ours) am 464fb26d: Fix build. Remove superfluous check ↵Paul Jensen2014-06-130-0/+0
|\| | | | | | | | | | | | | | | | | | | | triggering compiler error. * commit '0c41b16cf8db8c4df06ae8829cb1f0223203f212': Fix build. Remove superfluous check triggering compiler error.
| * | am 464fb26d: Fix build. Remove superfluous check triggering compiler error.Paul Jensen2014-06-131-1/+1
| |\| | | | | | | | | | | | | * commit '464fb26dd770b52b44721d46ef00985dc8fc88ee': Fix build. Remove superfluous check triggering compiler error.
| | * Fix build. Remove superfluous check triggering compiler error.Paul Jensen2014-06-131-1/+1
| | | | | | | | | | | | | | | | | | (cherry picked from commit fc0f94a75c7a6d16ea9e327092f132a0d2c9175e) Change-Id: I0366eb3882948d77a8be2d5d32169a13f412ad4e
* | | am 2bee04db: (-s ours) am 247dd719: Make DNS request for plat prefix ↵Paul Jensen2014-06-130-0/+0
|\| | | | | | | | | | | | | | | | | | | | detection network specific. * commit '2bee04db5c7be266919c588c8a06d60f51067baa': Make DNS request for plat prefix detection network specific.
| * | am 247dd719: Make DNS request for plat prefix detection network specific.Paul Jensen2014-06-136-16/+37
| |\| | | | | | | | | | | | | * commit '247dd7199b4e89c6a974794056b468bfac5f0e51': Make DNS request for plat prefix detection network specific.
| | * Make DNS request for plat prefix detection network specific.Paul Jensen2014-06-136-16/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Log unexpected arguments.Lorenzo Colitti2014-06-131-4/+7
| | | | | | | | | | | | | | | Bug: 15340961 Change-Id: Icde62d209e236d0156bf643bab694b92792be913
* | | Mark the raw socket used by clatd.Lorenzo Colitti2014-06-131-16/+40
| | | | | | | | | | | | | | | | | | | | | This is required to use clatd on a non-default network. Bug: 15340961 Change-Id: I289e5600da31e963a13c00679fa816f576678d61
* | | Use a packet socket to receive packets.Lorenzo Colitti2014-06-119-463/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Use a raw socket to send IPv6 packets instead of a tun.Lorenzo Colitti2014-06-114-24/+84
| | | | | | | | | | | | | | | | | | | | | This will allow us to bind the socket to a particular network. Bug: 15340961 Change-Id: I50857d372955f2b6f7035157c2968cda72c32585
* | | Make translate_packet take a fd instead of a tun header.Lorenzo Colitti2014-06-104-28/+31
| | | | | | | | | | | | | | | | | | | | | | | | This will make it easier to use separate fds for reading and writing in a future change. Bug: 15340961 Change-Id: I5b081b05765cae0488ac599be5738ce9737cae41
* | | Fix build. Remove superfluous check triggering compiler error.Paul Jensen2014-06-031-1/+1
| | | | | | | | | | | | Change-Id: I408b54938acfa475cf8734a50a5459218a4b325a
* | | Make DNS request for plat prefix detection network specific.Paul Jensen2014-06-026-16/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Place clatd ip routing rule into local table rather than main tablePaul Jensen2014-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | 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
* | | am 0a1b9dac: am e64eccb6: Merge commit ↵Bill Yi2014-04-300-0/+0
|\| | | | | | | | | | | | | | | | | \'d2346cad4215e2a5c50f7fd7d6d3f46c80286330\' into HEAD * commit '0a1b9dac7b826cea78189d45959aba156ee4478f':
| * | am e64eccb6: Merge commit \'d2346cad4215e2a5c50f7fd7d6d3f46c80286330\' into HEADBill Yi2014-04-300-0/+0
| |\| | | | | | | | | | * commit 'e64eccb68b8101d8fa2effb826e185db7f82dba9':
| | * Merge commit 'd2346cad4215e2a5c50f7fd7d6d3f46c80286330' into HEADBill Yi2014-04-291-0/+5
| | |\
| | | * am cd254c95: Update BUGS and bump version to 1.2Lorenzo Colitti2014-03-182-7/+3
| | | |\ | | | | | | | | | | | | | | | | | | | | * commit 'cd254c95a7cb5961bd53d16737f06bf261426e38': Update BUGS and bump version to 1.2
| | | * \ am 4d478421: Put the native test in the proper location.Lorenzo Colitti2014-03-171-1/+0
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '4d4784214bf7f03fc53c167777be87e512c6ed54': Put the native test in the proper location.
| | | * \ \ resolved conflicts for merge of 56ec161d to klp-dev-plus-aospLorenzo Colitti2014-03-135-10/+16
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | Change-Id: Idabec48d303cae126d9b80a2b1181f28927e2a9d
| | | * \ \ \ am d6c9bc21: TARGET_SIMULATOR is long dead.Elliott Hughes2014-03-111-4/+0
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd6c9bc21e673110aec61157419964b2e57c16078': TARGET_SIMULATOR is long dead.