Dump the unused IPv4 BPF rule age correctly am: 59f422694a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15164992 Change-Id: Iec2505b0d0648718f6d05445f87be87592f25c49
This commit is contained in:
@@ -1069,11 +1069,12 @@ public class BpfCoordinator {
|
|||||||
throw new AssertionError("IP address array not valid IPv4 address!");
|
throw new AssertionError("IP address array not valid IPv4 address!");
|
||||||
}
|
}
|
||||||
|
|
||||||
final long ageMs = (now - value.lastUsed) / 1_000_000;
|
final String ageStr = (value.lastUsed == 0) ? "-"
|
||||||
return String.format("[%s] %d(%s) %s:%d -> %d(%s) %s:%d -> %s:%d [%s] %dms",
|
: String.format("%dms", (now - value.lastUsed) / 1_000_000);
|
||||||
|
return String.format("[%s] %d(%s) %s:%d -> %d(%s) %s:%d -> %s:%d [%s] %s",
|
||||||
key.dstMac, key.iif, getIfName(key.iif), src4, key.srcPort,
|
key.dstMac, key.iif, getIfName(key.iif), src4, key.srcPort,
|
||||||
value.oif, getIfName(value.oif),
|
value.oif, getIfName(value.oif),
|
||||||
public4, publicPort, dst4, value.dstPort, value.ethDstMac, ageMs);
|
public4, publicPort, dst4, value.dstPort, value.ethDstMac, ageStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dumpIpv4ForwardingRuleMap(long now, boolean downstream,
|
private void dumpIpv4ForwardingRuleMap(long now, boolean downstream,
|
||||||
|
|||||||
Reference in New Issue
Block a user