Swap TX and RX in addForwardChainStats for clarity.
Bug: 32163131
Bug: 64995262
Test: netd_{unit,integration}_test pass
Test: tethering data usage UI reflects actual data usage
Change-Id: Icf5b66972d91e9e45e40d7b4989a15f970a78461
diff --git a/server/TetherController.cpp b/server/TetherController.cpp
index 3f6efe9..13cf1d8 100644
--- a/server/TetherController.cpp
+++ b/server/TetherController.cpp
@@ -692,12 +692,12 @@
ALOGV("0Filter RX iface_in=%s iface_out=%s rx_bytes=%" PRId64" rx_packets=%" PRId64" ", iface0, iface1, bytes, packets);
stats.intIface = iface0;
stats.extIface = iface1;
- stats.rxPackets = packets;
- stats.rxBytes = bytes;
- } else if (stats.intIface == iface1 && stats.extIface == iface0) {
- ALOGV("0Filter TX iface_in=%s iface_out=%s rx_bytes=%" PRId64" rx_packets=%" PRId64" ", iface0, iface1, bytes, packets);
stats.txPackets = packets;
stats.txBytes = bytes;
+ } else if (stats.intIface == iface1 && stats.extIface == iface0) {
+ ALOGV("0Filter TX iface_in=%s iface_out=%s rx_bytes=%" PRId64" rx_packets=%" PRId64" ", iface0, iface1, bytes, packets);
+ stats.rxPackets = packets;
+ stats.rxBytes = bytes;
}
if (stats.rxBytes != -1 && stats.txBytes != -1) {
ALOGV("rx_bytes=%" PRId64" tx_bytes=%" PRId64, stats.rxBytes, stats.txBytes);