ApfCounterTracker - reserve three slots for APFv6 endianness and allocate/transmit failure Technically only needed for APFv6+, but easier to always reserve. See also: aosp/2930730 Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I32515c9d3b9126f1b1e74d3f64d97facf3e8bdcf
diff --git a/src/android/net/apf/ApfCounterTracker.java b/src/android/net/apf/ApfCounterTracker.java index 0527666..b02efa0 100644 --- a/src/android/net/apf/ApfCounterTracker.java +++ b/src/android/net/apf/ApfCounterTracker.java
@@ -40,7 +40,10 @@ @VisibleForTesting public enum Counter { RESERVED_OOB, // Points to offset 0 from the end of the buffer (out-of-bounds) - TOTAL_PACKETS, + ENDIANNESS, // APFv6 interpreter stores 0x12345678 here + TOTAL_PACKETS, // hardcoded in APFv6 interpreter + PASSED_ALLOCATE_FAILURE, // hardcoded in APFv6 interpreter + PASSED_TRANSMIT_FAILURE, // hardcoded in APFv6 interpreter PASSED_ARP, PASSED_DHCP, PASSED_IPV4,