summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNingyuan Wang2017-04-25 12:40:11 -0500
committerNingyuan Wang2017-04-25 13:13:04 -0500
commitfe3f7bce54ee4f2eede9ac2ae23bc4e200f087d3 (patch)
tree74b4acdeae37565791576c53e83c3a02273428ab /server.cpp
parent6cfb9ad53ab12efb2ff87e7f67c974a60ac7636d (diff)
downloadsystem-connectivity-wificond-fe3f7bce54ee4f2eede9ac2ae23bc4e200f087d3.tar.gz
system-connectivity-wificond-fe3f7bce54ee4f2eede9ac2ae23bc4e200f087d3.tar.xz
system-connectivity-wificond-fe3f7bce54ee4f2eede9ac2ae23bc4e200f087d3.zip
Blacklist nan interfaces for wificond
Bug: 37644243 Test: manual tests Change-Id: Ia08cbd50e67b9c0d4ee1b5837c81001e33049936
Diffstat (limited to 'server.cpp')
-rw-r--r--server.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/server.cpp b/server.cpp
index 808f3bc..96a3ee8 100644
--- a/server.cpp
+++ b/server.cpp
@@ -20,6 +20,7 @@
20 20
21#include <android-base/file.h> 21#include <android-base/file.h>
22#include <android-base/logging.h> 22#include <android-base/logging.h>
23#include <android-base/strings.h>
23#include <binder/IPCThreadState.h> 24#include <binder/IPCThreadState.h>
24#include <binder/PermissionCache.h> 25#include <binder/PermissionCache.h>
25 26
@@ -260,7 +261,10 @@ bool Server::SetupInterface(InterfaceInfo* interface) {
260 // Some kernel/driver uses station type for p2p interface. 261 // Some kernel/driver uses station type for p2p interface.
261 // In that case we can only rely on hard-coded name to exclude 262 // In that case we can only rely on hard-coded name to exclude
262 // p2p interface from station interfaces. 263 // p2p interface from station interfaces.
263 if (iface.name != "p2p0") { 264 // Currently NAN interfaces also use station type.
265 // We should blacklist NAN interfaces as well.
266 if (iface.name != "p2p0" &&
267 !android::base::StartsWith(iface.name, "aware_data")) {
264 *interface = iface; 268 *interface = iface;
265 return true; 269 return true;
266 } 270 }