summaryrefslogtreecommitdiffstats
path: root/libwifi_system
diff options
context:
space:
mode:
Diffstat (limited to 'libwifi_system')
-rw-r--r--libwifi_system/interface_tool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libwifi_system/interface_tool.cpp b/libwifi_system/interface_tool.cpp
index 264ab7066..af9cc0805 100644
--- a/libwifi_system/interface_tool.cpp
+++ b/libwifi_system/interface_tool.cpp
@@ -34,7 +34,7 @@ const char kWlan0InterfaceName[] = "wlan0";
} // namespace
bool InterfaceTool::SetUpState(const char* if_name, bool request_up) {
- base::unique_fd sock(socket(PF_INET, SOCK_DGRAM, 0));
+ base::unique_fd sock(socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0));
if (sock.get() < 0) {
LOG(ERROR) << "Failed to open socket to set up/down state ("
<< strerror(errno) << ")";