summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| | | * \ \ \ \ am a4454bfd: Declare pos as clat_packet_index instead of intLorenzo Colitti2014-03-114-35/+33
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a4454bfda99803c287b78f8d1cd7bdc1b56065db': Declare pos as clat_packet_index instead of int
| | | * \ \ \ \ \ am 2b4cc739: DO NOT MERGE: Support translating fragmented packets.Lorenzo Colitti2014-03-111-0/+5
| | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '2b4cc7393268622ac3de071435a6e4ab857342df': DO NOT MERGE: Support translating fragmented packets.
| | | * \ \ \ \ \ \ resolved conflicts for merge of 13a58c48 to klp-dev-plus-aospLorenzo Colitti2014-03-110-0/+0
| | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Idfca8179c5f9829cf24f53f8e4e7f3f4f32234b0
| | | * \ \ \ \ \ \ \ am fcac410f: Use uint8_t not char for binary data to avoid -Wall -Werror ↵Brian Carlstrom2014-03-118-98/+117
| | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | issues on x86 builds * commit 'fcac410fa15613873a07143ccd46470b869346a3': Use uint8_t not char for binary data to avoid -Wall -Werror issues on x86 builds
| | | * \ \ \ \ \ \ \ \ am f3beefc9: Add a unit test for 464xlat translation code.Lorenzo Colitti2014-03-112-0/+691
| | | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f3beefc96a5a4f295562f60d648bd6e795980a10': Add a unit test for 464xlat translation code.
| | | * \ \ \ \ \ \ \ \ \ am 57d480d2: Support translating fragmented packets.Lorenzo Colitti2014-03-116-35/+126
| | | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '57d480d2b425ef20d8b6f84abd4e9e3209fa9422': Support translating fragmented packets.
| | | * \ \ \ \ \ \ \ \ \ \ resolved conflicts for merge of 07f02658 to klp-dev-plus-aospLorenzo Colitti2014-03-115-18/+18
| | | |\ \ \ \ \ \ \ \ \ \ \