diff options
| author | Matias Fontanini <matias.fontanini@gmail.com> | 2016-02-02 22:43:28 -0800 |
|---|---|---|
| committer | Matias Fontanini <matias.fontanini@gmail.com> | 2016-02-02 22:43:28 -0800 |
| commit | 4b0976571ec5768ccde12ae3d6d53db8fee5a7a4 (patch) | |
| tree | 98ea9a7c71523645c36f17be17e50a3d497c0a35 /src | |
| parent | 8ab48106d6ffa063f536b8fdc668d48849ebee96 (diff) | |
Fix invalid FCS serialization offset on RadioTapv3.3
Diffstat (limited to 'src')
| -rw-r--r-- | src/radiotap.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/radiotap.cpp b/src/radiotap.cpp index e2816c9..d0c3c5c 100644 --- a/src/radiotap.cpp +++ b/src/radiotap.cpp @@ -522,7 +522,7 @@ void RadioTap::write_serialization(uint8_t* buffer, uint32_t total_sz, const PDU stream.write(rate_); } if (radio_.flags.channel) { - if (((buffer - buffer_start) & 1) == 1) { + if (((stream.pointer() - buffer_start) & 1) == 1) { stream.write<uint8_t>(0); } stream.write(channel_freq_); @@ -535,7 +535,7 @@ void RadioTap::write_serialization(uint8_t* buffer, uint32_t total_sz, const PDU stream.write(dbm_noise_); } if (radio_.flags.lock_quality) { - if (((buffer - buffer_start) & 1) == 1) { + if (((stream.pointer() - buffer_start) & 1) == 1) { stream.write<uint8_t>(0); } stream.write(signal_quality_); @@ -547,7 +547,7 @@ void RadioTap::write_serialization(uint8_t* buffer, uint32_t total_sz, const PDU stream.write(db_signal_); } if (radio_.flags.rx_flags) { - if (((buffer - buffer_start) & 1) == 1) { + if (((stream.pointer() - buffer_start) & 1) == 1) { stream.write<uint8_t>(0); } stream.write(rx_flags_); |
