Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4a115a2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "IWifi: Validate dedicated NAN discovery interface." into rvc-dev am: ecec92b7

Change-Id: Ic5ba025643f407265014057bb2a2c8370ca3b82f
parents e5d75fd8 ecec92b7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <android-base/logging.h>
#include <android-base/unique_fd.h>
#include <cutils/properties.h>
#include <net/if.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>

@@ -885,7 +886,7 @@ std::pair<WifiStatus, sp<IWifiNanIface>> WifiChip::createNanIfaceInternal() {
    }
    bool is_dedicated_iface = true;
    std::string ifname = getNanIfaceName();
    if (ifname.empty()) {
    if (ifname.empty() || if_nametoindex(ifname.c_str())) {
        // Use the first shared STA iface (wlan0) if a dedicated aware iface is
        // not defined.
        ifname = getFirstActiveWlanIfaceName();