1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-26 12:01:34 +01:00

Fixed bug on Dot11QoSData.

This commit is contained in:
Matias Fontanini
2013-06-04 15:49:49 -03:00
parent c2353314fa
commit 996e0f139e
2 changed files with 9 additions and 3 deletions

View File

@@ -154,8 +154,13 @@ Dot11QoSData::Dot11QoSData(const uint8_t *buffer, uint32_t total_sz)
_qos_control = *(uint16_t*)buffer;
total_sz -= sizeof(uint16_t);
buffer += sizeof(uint16_t);
if(total_sz)
inner_pdu(new Tins::SNAP(buffer, total_sz));
if(total_sz) {
// If the wep bit is on, then just use a RawPDU
if(wep())
inner_pdu(new Tins::RawPDU(buffer, total_sz));
else
inner_pdu(new Tins::SNAP(buffer, total_sz));
}
}
void Dot11QoSData::qos_control(uint16_t new_qos_control) {