diff options
author | Maciej Żenczykowski <maze@google.com> | 2019-03-30 03:32:51 -0700 |
---|---|---|
committer | Maciej Żenczykowski <maze@google.com> | 2019-04-23 18:46:16 -0700 |
commit | 56280274e15d3e66a6a00142356cb955035080b4 (patch) | |
tree | 849cd68ea4d55fa2557d5534dbeec8e13fc541ee /server/NetdNativeService.cpp | |
parent | a96083f9048667e0e030b630106415b540882992 (diff) | |
download | netd-56280274e15d3e66a6a00142356cb955035080b4.tar.gz |
ClatdController - add mutex annotations
This effectively makes ClatdController single threaded.
Which makes things nice and simple.
Test: atest libbpf_android_test libnetdbpf_test netd_integration_test netd_unit_test netdutils_test resolv_integration_test resolv_unit_test
Bug: 65674744
Change-Id: I352761b6c44c17f9ea0897ea821a826f642659d5
Diffstat (limited to 'server/NetdNativeService.cpp')
-rw-r--r-- | server/NetdNativeService.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/NetdNativeService.cpp b/server/NetdNativeService.cpp index b1b5e0b2..c2598ced 100644 --- a/server/NetdNativeService.cpp +++ b/server/NetdNativeService.cpp @@ -852,13 +852,13 @@ binder::Status NetdNativeService::strictUidCleartextPenalty(int32_t uid, int32_t binder::Status NetdNativeService::clatdStart(const std::string& ifName, const std::string& nat64Prefix, std::string* v6Addr) { - NETD_LOCKING_RPC(gCtls->clatdCtrl.mutex, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); + ENFORCE_ANY_PERMISSION(PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); int res = gCtls->clatdCtrl.startClatd(ifName.c_str(), nat64Prefix, v6Addr); return statusFromErrcode(res); } binder::Status NetdNativeService::clatdStop(const std::string& ifName) { - NETD_LOCKING_RPC(gCtls->clatdCtrl.mutex, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); + ENFORCE_ANY_PERMISSION(PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); int res = gCtls->clatdCtrl.stopClatd(ifName.c_str()); return statusFromErrcode(res); } |