diff --git a/infrastructure-centred/owlps-listener/owlps-listenerd.c b/infrastructure-centred/owlps-listener/owlps-listenerd.c index c9256e4..2d70c3c 100644 --- a/infrastructure-centred/owlps-listener/owlps-listenerd.c +++ b/infrastructure-centred/owlps-listener/owlps-listenerd.c @@ -622,9 +622,14 @@ void read_packet(u_char *args, const struct pcap_pkthdr *header, printf("This packet is a Retry.\n") ; #endif // DEBUG - memcpy(couple.ap_mac_addr_bytes, my_mac, 6) ; // Copy AP MAC // Source MAC address is 10 bytes after the 802.11 packet type: memcpy(couple.mobile_mac_addr_bytes, &data[rtap_bytes+10], 6) ; + + // Drop the packet if it comes from the AP itself: + if (mac_cmp(my_mac, couple.mobile_mac_addr_bytes)) + return ; + + memcpy(couple.ap_mac_addr_bytes, my_mac, 6) ; // Copy AP MAC couple.start_time = header->ts ; // Capture time is in the pcap header // Transmission time on the mobile is unknown (unless the packet is // an explicit request):