diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-28 20:24:06 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-28 20:24:06 +0000 |
commit | 98747ecf684bf6c46ad62a54cae7ea9a9f1fc33c (patch) | |
tree | ac9a90d6280e22785aaca68db210bf5612ea1b13 | |
parent | 6da918a284be3ff45f943baa99bcba53c9fbf8df (diff) | |
parent | 8addcc0f6360cc3762e9ef27437ded250e785da3 (diff) | |
download | android-clat-android10-mainline-tzdata-release.tar.gz |
Snap for 6439596 from 8addcc0f6360cc3762e9ef27437ded250e785da3 to qt-aml-tzdata-releaseq_tzdata_aml_297100400q_tzdata_aml_297100300q_tzdata_aml_297100000q_tzdata_aml_296200000q_tzdata_aml_295600118q_tzdata_aml_295600110q_tzdata_aml_295500002q_tzdata_aml_295500001q_tzdata_aml_294400310android-mainline-12.0.0_r54android-mainline-12.0.0_r111android-mainline-10.0.0_r13android-mainline-10.0.0_r12android-mainline-10.0.0_r11q_tzdata_aml_297100000android12-mainline-tzdata-releaseandroid10-mainline-tzdata-releaseandroid10-android13-mainline-tzdata-release
Change-Id: I2a65fadc52cc5eb6b1db7cac4f9f3ad58059417e
-rw-r--r-- | Android.bp | 1 | ||||
-rw-r--r-- | BUGS | 2 | ||||
-rw-r--r-- | TEST_MAPPING | 10 | ||||
-rw-r--r-- | clatd.c | 5 | ||||
-rw-r--r-- | config.c | 2 | ||||
-rw-r--r-- | ipv4.c | 2 | ||||
-rw-r--r-- | ipv6.c | 2 |
7 files changed, 12 insertions, 12 deletions
@@ -94,7 +94,6 @@ cc_test { "libnetutils", ], test_suites: ["device-tests"], - require_root: true, } // Microbenchmark. @@ -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" + } ] } @@ -417,6 +417,11 @@ void read_packet(int read_fd, int write_fd, int to_ipv6) { } 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; @@ -234,7 +234,7 @@ int connect_is_ipv4_address_free(in_addr_t addr) { // 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) && @@ -131,7 +131,7 @@ int ipv4_packet(clat_packet out, clat_packet_index pos, const uint8_t *packet, s } 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 @@ -163,7 +163,7 @@ int ipv6_packet(clat_packet out, clat_packet_index pos, const uint8_t *packet, s } 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 |