| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: 12111730
Change-Id: I062d81f2b65e6e89baae0f840cbd673f8051d523
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
(cherry picked from commit 18921713780edb45ceef327d5fcf3387818300f3)
Change-Id: I132f7a4ea1a73073fe22ca5f3d89644f2a302db3
|
|
|
|
|
|
| |
(cherry picked from commit 787ea96922dc3942946fd4ad1e0495d4e06e0c2f)
Change-Id: I4582222c8576353b800cc7d30f16c5dbe5f2e8a9
|
|\
| |
| |
| |
| | |
* commit '913e2e493b229493eb43a0e136c5c3f6b568b5de':
Create the tun device after dropping root privileges.
|
| |\
| | |
| | |
| | |
| | | |
* commit '7045e27d4946330f3152218fdaa81b37d02b6d6c':
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
|
|\| |
| | |
| | |
| | |
| | | |
* commit '87342f29a9bbf15db4867941e4d3bb2e4fd11053':
Log unexpected arguments.
|
| |\|
| | |
| | |
| | |
| | | |
* commit 'b9b471e1e3788a398adeb0a04bfc52d6ba7c3cf6':
Log unexpected arguments.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(cherry picked from commit 3e7b1d8f783320d38382089a3c9a790ba13772dc)
Bug: 15340961
Change-Id: Iff172b066aa468f9ee36aab661a8b51cb03db95b
|
|\| |
| | |
| | |
| | |
| | | |
* commit '522930f0659319bf8d3d22b72a7d68280de295fe':
Mark the raw socket used by clatd.
|
| |\|
| | |
| | |
| | |
| | | |
* commit '7564761e2d98ce52a128b2338ec5edcd13aaed01':
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
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'fa6e9d325622d7a507b2e9d19e2e145647295ee6':
Use a packet socket to receive packets.
|
| |\|
| | |
| | |
| | |
| | | |
* commit 'f08c5aa666d170c17abb784081897ea169c1b67f':
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
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
instead of a tun.
* commit 'ffe528a969017b7d1687528ddf580395e54fb99d':
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will allow us to bind the socket to a particular network.
(cherry picked from commit 10e8827d636a72a7bcdfd52d15bad9342ae2a0a6)
Bug: 15340961
Change-Id: I0b62ef96364a90b9c0a9e3ac3ba97b5c19c89b69
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
of a tun header.
* commit 'd3edb2776e549f0952332055401ab4c5d743695c':
Make translate_packet take a fd instead of a tun header.
|
| |\|
| | |
| | |
| | |
| | | |
* commit 'e24982ea3a4480d9d62c75b4d9a416b9479f7f0b':
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
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
triggering compiler error.
* commit '0c41b16cf8db8c4df06ae8829cb1f0223203f212':
Fix build. Remove superfluous check triggering compiler error.
|
| |\|
| | |
| | |
| | |
| | | |
* commit '464fb26dd770b52b44721d46ef00985dc8fc88ee':
Fix build. Remove superfluous check triggering compiler error.
|
| | |
| | |
| | |
| | |
| | |
| | | |
(cherry picked from commit fc0f94a75c7a6d16ea9e327092f132a0d2c9175e)
Change-Id: I0366eb3882948d77a8be2d5d32169a13f412ad4e
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
detection network specific.
* commit '2bee04db5c7be266919c588c8a06d60f51067baa':
Make DNS request for plat prefix detection network specific.
|
| |\|
| | |
| | |
| | |
| | | |
* commit '247dd7199b4e89c6a974794056b468bfac5f0e51':
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
|
| | |
| | |
| | |
| | |
| | | |
Bug: 15340961
Change-Id: Icde62d209e236d0156bf643bab694b92792be913
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is required to use clatd on a non-default network.
Bug: 15340961
Change-Id: I289e5600da31e963a13c00679fa816f576678d61
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will allow us to bind the socket to a particular network.
Bug: 15340961
Change-Id: I50857d372955f2b6f7035157c2968cda72c32585
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will make it easier to use separate fds for reading and
writing in a future change.
Bug: 15340961
Change-Id: I5b081b05765cae0488ac599be5738ce9737cae41
|
| | |
| | |
| | |
| | | |
Change-Id: I408b54938acfa475cf8734a50a5459218a4b325a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\| |
| | |
| | |
| | |
| | |
| | | |
\'d2346cad4215e2a5c50f7fd7d6d3f46c80286330\' into HEAD
* commit '0a1b9dac7b826cea78189d45959aba156ee4478f':
|
| |\|
| | |
| | |
| | | |
* commit 'e64eccb68b8101d8fa2effb826e185db7f82dba9':
|
| | |\ |
|
| | | |\
| | | | |
| | | | |
| | | | |
| | | | | |
* commit 'cd254c95a7cb5961bd53d16737f06bf261426e38':
Update BUGS and bump version to 1.2
|
| | | |\ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* commit '4d4784214bf7f03fc53c167777be87e512c6ed54':
Put the native test in the proper location.
|
| | | |\ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Change-Id: Idabec48d303cae126d9b80a2b1181f28927e2a9d
|
| | | |\ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
* commit 'd6c9bc21e673110aec61157419964b2e57c16078':
TARGET_SIMULATOR is long dead.
|