We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4760da commit ee07327Copy full SHA for ee07327
src/network/utils/radiotap-header.cc
@@ -522,6 +522,12 @@ RadiotapHeader::UpdatePresentField(uint32_t field)
522
NS_ASSERT_MSG(!(m_present.at(bitmaskIdx) & flag),
523
"Radiotap field " << field << " already set in present field at index "
524
<< bitmaskIdx);
525
+ NS_ASSERT_MSG((m_present.at(bitmaskIdx) < flag) &&
526
+ ((m_present.size() == (bitmaskIdx + 1)) ||
527
+ std::all_of(m_present.begin() + bitmaskIdx + 1,
528
+ m_present.end(),
529
+ [](uint32_t present) { return present == 0; })),
530
+ "Radiotap fields not set in correct order");
531
}
532
if (const uint32_t morePresentWordFlag = (1 << RADIOTAP_MORE_PRESENT); bitmaskIdx > 0)
533
{
0 commit comments