diff --git a/examples/simple_repeater/PacketFilter.h b/examples/simple_repeater/PacketFilter.h index aa113599..d96a8f41 100644 --- a/examples/simple_repeater/PacketFilter.h +++ b/examples/simple_repeater/PacketFilter.h @@ -146,7 +146,7 @@ struct FilterRule { // v7: the writer forces it and the reader refuses a v7 record that has it // set, so a future field can take the byte the way type_mask_hi took 186 uint32_t hits; // match counter (forward/drop telemetry + validation) - uint32_t air_ms; // estimated on-air time (ms) billed by this rule's + uint64_t air_ms; // estimated on-air time (ms) billed by this rule's // DROP decisions; RAM-only stat, after `hits` so it // is never persisted (persist ends at offsetof(hits)) // RAM-only throttle state — never persisted (persist ends at offsetof(hits)); diff --git a/test/test_packet_filter/test_packet_filter.cpp b/test/test_packet_filter/test_packet_filter.cpp index efa07def..0a5dd6c3 100644 --- a/test/test_packet_filter/test_packet_filter.cpp +++ b/test/test_packet_filter/test_packet_filter.cpp @@ -3546,8 +3546,10 @@ TEST_F(FilterTest, AirSavedPercentageUsesWideCounters) { filter.checkPacket(&adv, 0, nullptr, UINT32_MAX); EXPECT_EQ(filter.getAirSavedMs(), uint64_t(UINT32_MAX) * 2); EXPECT_EQ(filter.getAirEvaluatedMs(), uint64_t(UINT32_MAX) * 3); + EXPECT_EQ(filter.getRule(0)->air_ms, uint64_t(UINT32_MAX) * 2); EXPECT_EQ(filter.getAirSavedPercent(), 67u); EXPECT_NE(cli(filter, "stats").find("air:8589934s:67%;"), std::string::npos); + EXPECT_NE(cli(filter, "get 0").find("air=8589934s"), std::string::npos); } TEST_F(FilterTest, AirSavedPercentageCountsContentOnce) {