| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Android 4.3 release 2.1
|
| |
| |
| |
| |
| | |
Bug: 9730936
Change-Id: I2c50422c7b502d5b9bdc01afb55d25353f6c7088
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |\| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a function for dumping iovecs, and make hexdumps clearer by
adding spaces between bytes.
Bug: 8276725
Change-Id: Ifb2f8317613d05fa6bd600700090a6df258cde08
|
| |\| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | | |
Bug: 8580410
Change-Id: I22d0f0a30e5e42ff0c68805703747dd46ccf4fb6
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
The IPv4 default route is now added by ConnectivityService
because the stacked LinkProperties object contains it.
Bug: 8276725
Change-Id: I6513bfa4df29b8663cefd30ed0bae1a80b63447c
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is no longer necessary now that the kernel removes it for us
when accept_ra = 2.
Bug: 8276725
Change-Id: If16d9fbc63af2829f1ee4c87031f895f15a3b3d7
|
| |
| |
| |
| |
| | |
Bug: 8276725
Change-Id: Iedbd34bc94f678afe51429078e6c06ff144e6373
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |/
| |
| |
| | |
Change-Id: I8e7130c1c9b7d6397bc5e705e58667fb7b37b598
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |/
| |
| |
| |
| |
| | |
Bug: 7664960
Change-Id: Ieb56bcc010d0e12264d43e0a0dfcb1beb479d4e2
|
| |
| |
| |
| |
| |
| | |
The builds the clatd and adds the needed conf file.
Change-Id: Idb45a7b8b712ffaedddee9f3ca73d44001eaba81
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|