1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 20:44:26 +01:00

The FCS-at-end flag was being ignored in RadioTap. Added beacon display example.

This commit is contained in:
Matias Fontanini
2012-10-15 23:53:36 -03:00
parent 87292a6039
commit a0f5d26987
4 changed files with 70 additions and 15 deletions

View File

@@ -115,7 +115,14 @@ Tins::RadioTap::RadioTap(const uint8_t *buffer, uint32_t total_sz)
buffer += sizeof(_rx_flags);
total_sz -= sizeof(_rx_flags);
}
if(total_sz)
if((flags() & FCS) != 0) {
if(total_sz <= 4)
throw std::runtime_error(msg);
else {
total_sz -= sizeof(uint32_t);
}
}
if(total_sz)
inner_pdu(Dot11::from_bytes(buffer, total_sz));
}