summaryrefslogtreecommitdiffstats
path: root/debug.h
diff options
context:
space:
mode:
authorBernie Innocenti <codewiz@google.com>2018-05-14 20:40:49 +0900
committerBernie Innocenti <codewiz@google.com>2018-05-16 14:05:15 +0900
commit7ac4a30be5d8cbfafc740f9f86d30f37d15f4483 (patch)
treeabe9305227662edad00cb78d44258d3d7c42da4b /debug.h
parentcdc003dc8a8ffb418f33518ac545016e6991534a (diff)
downloadplatform_external_android-clat-pie-qpr1-release.tar.gz
platform_external_android-clat-pie-qpr1-release.tar.bz2
platform_external_android-clat-pie-qpr1-release.zip
In the event the packet socket has an error, it is likely not cleared and clatd can spin in a tight loop. This may happen when a network is going down (ENETDOWN, ENETUNREACH, ...). Ordinarily the ConnectivityService/Nat464Xlat/ClatdController control plane would tear down clatd in this case. However, if the control plane is deadlocked, clatd will chew up CPU indefinitely. This fix consists of detecting when poll() exits due to a socket error and trying to clear the error by issuing a no-op recv() on the packet socket and a 0-byte read() for the /dev/tun socket. Test: manually, on a marlyn device (kernel 3.18.70) Bug: 78602493 Change-Id: Ic23f999712a674df11e981a4314ad371e8d5fb6d (cherry picked from commit 69dc60de5d53488a3c45737ec17b242d703d682b)
Diffstat (limited to 'debug.h')
0 files changed, 0 insertions, 0 deletions