summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2014-03-08 20:29:41 +0000
committerLorenzo Colitti <lorenzo@google.com>2014-03-08 20:29:41 +0000
commit88ee177670cc651784e1c58fac814202e63414ac (patch)
treeb7ad2ab2fed6c776ab5470c656157f66a0eb7988
parentcb72f3643f475b70089e79108e16621787262e2b (diff)
downloadandroid_external_android-clat-88ee177670cc651784e1c58fac814202e63414ac.tar.gz
android_external_android-clat-88ee177670cc651784e1c58fac814202e63414ac.tar.bz2
android_external_android-clat-88ee177670cc651784e1c58fac814202e63414ac.zip
Revert "DO NOT MERGE: Remove unused variables"
This reverts commit cb72f3643f475b70089e79108e16621787262e2b. Change-Id: I10196a15fe92e281d4922f384f373a964ff703ec
-rw-r--r--clatd.c2
-rw-r--r--config.c2
-rw-r--r--icmp.c2
-rw-r--r--ipv6.c1
-rw-r--r--translate.c1
5 files changed, 6 insertions, 2 deletions
diff --git a/clatd.c b/clatd.c
index 43fb5c6..1ca46a3 100644
--- a/clatd.c
+++ b/clatd.c
@@ -144,6 +144,7 @@ void deconfigure_tun_ipv6(const struct tun_data *tunnel) {
* tunnel - tun device data
*/
void configure_tun_ipv6(const struct tun_data *tunnel) {
+ struct in6_addr local_nat64_prefix_6;
int status;
status = if_route(tunnel->device6, AF_INET6, &Global_Clatd_Config.ipv6_local_subnet,
@@ -376,6 +377,7 @@ void read_packet(int active_fd, const struct tun_data *tunnel) {
logmsg(ANDROID_LOG_WARN,"read_packet/tun interface removed");
running = 0;
} else {
+ struct tun_pi tun_header;
ssize_t header_size = sizeof(struct tun_pi);
if(readlen < header_size) {
diff --git a/config.c b/config.c
index b82ac6c..61a4ebb 100644
--- a/config.c
+++ b/config.c
@@ -154,7 +154,7 @@ void free_config() {
* does dns lookups to set the plat subnet or exits on failure, waits forever for a dns response with a query backoff timer
*/
void dns64_detection() {
- int backoff_sleep, status;
+ int i, backoff_sleep, status;
struct in6_addr tmp_ptr;
backoff_sleep = 1;
diff --git a/icmp.c b/icmp.c
index 75a4a4d..af96b83 100644
--- a/icmp.c
+++ b/icmp.c
@@ -139,7 +139,7 @@ uint8_t icmp6_to_icmp_type(uint8_t type, uint8_t code) {
}
// We don't understand this ICMP type. Return parameter problem so the caller will bail out.
- logmsg_dbg(ANDROID_LOG_DEBUG, "icmp6_to_icmp_type: unhandled ICMP type/code %d/%d", type, code);
+ logmsg_dbg(ANDROID_LOG_DEBUG, "icmp6_to_icmp_type: unhandled ICMP type %d", type);
return ICMP_PARAMETERPROB;
}
diff --git a/ipv6.c b/ipv6.c
index d9dcc09..faf27ad 100644
--- a/ipv6.c
+++ b/ipv6.c
@@ -89,6 +89,7 @@ int ipv6_packet(clat_packet out, int pos, const char *packet, size_t len) {
size_t len_left;
uint32_t checksum;
int iov_len;
+ int i;
if(len < sizeof(struct ip6_hdr)) {
logmsg_dbg(ANDROID_LOG_ERROR, "ipv6_packet/too short for an ip6 header: %d", len);
diff --git a/translate.c b/translate.c
index 71263fa..fc70f3d 100644
--- a/translate.c
+++ b/translate.c
@@ -245,6 +245,7 @@ int icmp6_to_icmp(clat_packet out, int pos, const struct icmp6_hdr *icmp6, uint3
const char *payload, size_t payload_size) {
struct icmphdr *icmp_targ = out[pos].iov_base;
uint8_t icmp_type;
+ int ttl;
int clat_packet_len;
memset(icmp_targ, 0, sizeof(struct icmphdr));