Revert "DO NOT MERGE: Remove unused variables"
This reverts commit cb72f3643f475b70089e79108e16621787262e2b.
Change-Id: I10196a15fe92e281d4922f384f373a964ff703ec
diff --git a/clatd.c b/clatd.c
index 43fb5c6..1ca46a3 100644
--- a/clatd.c
+++ b/clatd.c
@@ -144,6 +144,7 @@
* 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 @@
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 @@
* 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 @@
}
// 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 @@
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 @@
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));