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

Added another test case for RadioTap's constructor from buffer.

This commit is contained in:
Matias Fontanini
2013-04-22 12:53:01 -03:00
parent d1b64ec48e
commit 7da8de6ea7
2 changed files with 36 additions and 3 deletions

View File

@@ -339,9 +339,10 @@ void RadioTap::write_serialization(uint8_t *buffer, uint32_t total_sz, const PDU
memcpy(buffer, &_max_power, sizeof(_max_power));
buffer += sizeof(_max_power);
}
if((_flags & 0x10) != 0 && inner_pdu())
if((_flags & 0x10) != 0 && inner_pdu()) {
*(uint32_t*)(buffer + inner_pdu()->size()) = Endian::host_to_le(
Utils::crc32(buffer, inner_pdu()->size())
);
}
}
}