[Listener] Drop packets emitted by ourselves
This commit is contained in:
parent
a4d001c4fb
commit
3f0d07a672
|
@ -622,9 +622,14 @@ void read_packet(u_char *args, const struct pcap_pkthdr *header,
|
||||||
printf("This packet is a Retry.\n") ;
|
printf("This packet is a Retry.\n") ;
|
||||||
#endif // DEBUG
|
#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:
|
// Source MAC address is 10 bytes after the 802.11 packet type:
|
||||||
memcpy(couple.mobile_mac_addr_bytes, &data[rtap_bytes+10], 6) ;
|
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
|
couple.start_time = header->ts ; // Capture time is in the pcap header
|
||||||
// Transmission time on the mobile is unknown (unless the packet is
|
// Transmission time on the mobile is unknown (unless the packet is
|
||||||
// an explicit request):
|
// an explicit request):
|
||||||
|
|
Loading…
Reference in New Issue