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

Commit 8103f44e authored by Dundi Raviteja's avatar Dundi Raviteja
Browse files

wlan: Drop invalid EAPOL packets in SAP mode

Drop inalid EAPOL packets in SAP mode which are not
destined to self mac address.

Change-Id: I9754dddf580e60bd88ddc6e28355162499a8d125
CRs-Fixed: 2868054
parent c305e106
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -1728,9 +1728,19 @@ VOS_STATUS hdd_softap_rx_packet_cbk( v_VOID_t *vosContext,
         return VOS_STATUS_E_FAILURE;
      }

      if (TRUE == hdd_IsEAPOLPacket(pVosPacket))
      if (TRUE == hdd_IsEAPOLPacket(pVosPacket)) {
          wlan_hdd_log_eapol(skb, WIFI_EVENT_DRIVER_EAPOL_FRAME_RECEIVED);

          if (vos_mem_compare2(skb->data,
                               pAdapter->macAddressCurrent.bytes, 6) != 0) {
              VOS_TRACE(VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,
                        "Packet is not destined to this address, dropping");
              kfree_skb(skb);
              pVosPacket = pNextVosPacket;
              continue;
          }
      }

      pVosPacket->pSkb = NULL;
      //hdd_softap_dump_sk_buff(skb);