Snap for 6439596 from 8addcc0f6360cc3762e9ef27437ded250e785da3 to qt-aml-tzdata-release

Change-Id: I2a65fadc52cc5eb6b1db7cac4f9f3ad58059417e
diff --git a/Android.bp b/Android.bp
index 1d21c24..b495dac 100644
--- a/Android.bp
+++ b/Android.bp
@@ -94,7 +94,6 @@
         "libnetutils",
     ],
     test_suites: ["device-tests"],
-    require_root: true,
 }
 
 // Microbenchmark.
diff --git a/BUGS b/BUGS
index 24e6639..70aeb9f 100644
--- a/BUGS
+++ b/BUGS
@@ -1,5 +1,5 @@
 known problems/assumptions:
- - does not handle protocols other than ICMP, UDP, TCP and GRE/ESP
+ - does not handle protocols other than ICMP, UDP, TCP and GRE
  - assumes the handset has its own (routed) /64 ipv6 subnet
  - assumes the /128 ipv6 subnet it generates can use the nat64 gateway
  - assumes the nat64 gateway has the ipv4 address in the last 32 bits of the ipv6 address (that it uses a /96 plat subnet)
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 873ff2f..c6d599d 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,11 +1,7 @@
 {
   "presubmit": [
-    { "name": "clatd_test" },
-    { "name": "libnetdbpf_test" },
-    { "name": "netd_integration_test" },
-    { "name": "netd_unit_test" },
-    { "name": "netdutils_test" },
-    { "name": "resolv_integration_test" },
-    { "name": "resolv_unit_test" }
+    {
+      "name": "clatd_test"
+    }
   ]
 }
diff --git a/clatd.c b/clatd.c
index 019ce7c..d332e1e 100644
--- a/clatd.c
+++ b/clatd.c
@@ -417,6 +417,11 @@
   }
 
   uint16_t proto = ntohs(tun_header->proto);
+  if (proto == ETH_P_IPV6) {
+    // kernel IPv6 stack spams us with router/neighbour solication,
+    // multicast group joins, etc. which otherwise fills the log...
+    return;
+  }
   if (proto != ETH_P_IP) {
     logmsg(ANDROID_LOG_WARN, "%s: unknown packet type = 0x%x", __func__, proto);
     return;
diff --git a/config.c b/config.c
index c370770..f84a61f 100644
--- a/config.c
+++ b/config.c
@@ -234,7 +234,7 @@
 
   // Attempt to connect to the address. If the connection succeeds and getsockname returns the same
   // the address then the address is already assigned to the system and we can't use it.
-  struct sockaddr_in sin = { .sin_family = AF_INET, .sin_addr = { addr }, .sin_port = htons(53) };
+  struct sockaddr_in sin = { .sin_family = AF_INET, .sin_addr = { addr }, .sin_port = 53 };
   socklen_t len          = sizeof(sin);
   int inuse              = connect(s, (struct sockaddr *)&sin, sizeof(sin)) == 0 &&
               getsockname(s, (struct sockaddr *)&sin, &len) == 0 && (size_t)len >= sizeof(sin) &&
diff --git a/ipv4.c b/ipv4.c
index c052d03..56d83ac 100644
--- a/ipv4.c
+++ b/ipv4.c
@@ -131,7 +131,7 @@
   } else if (nxthdr == IPPROTO_UDP) {
     iov_len =
       udp_packet(out, pos + 2, (const struct udphdr *)next_header, old_sum, new_sum, len_left);
-  } else if (nxthdr == IPPROTO_GRE || nxthdr == IPPROTO_ESP) {
+  } else if (nxthdr == IPPROTO_GRE) {
     iov_len = generic_packet(out, pos + 2, next_header, len_left);
   } else {
 #if CLAT_DEBUG
diff --git a/ipv6.c b/ipv6.c
index ca3e4c6..c9b547e 100644
--- a/ipv6.c
+++ b/ipv6.c
@@ -163,7 +163,7 @@
   } else if (protocol == IPPROTO_UDP) {
     iov_len =
       udp_packet(out, pos + 2, (const struct udphdr *)next_header, old_sum, new_sum, len_left);
-  } else if (protocol == IPPROTO_GRE || protocol == IPPROTO_ESP) {
+  } else if (protocol == IPPROTO_GRE) {
     iov_len = generic_packet(out, pos + 2, next_header, len_left);
   } else {
 #if CLAT_DEBUG