clat - turn off spurious log messages caused by IPv6 packets
This eliminates log lines of the form:
W clatd : read_packet: unknown packet type = 0x86dd
Test: stuff is much quieter on device
Bug: 129305844
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8ee7478b4f956265233ba4e2c4237895607d697c
diff --git a/clatd.c b/clatd.c
index 3ccceea..94a0f06 100644
--- a/clatd.c
+++ b/clatd.c
@@ -430,6 +430,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;