Dump the unused IPv4 BPF rule age correctly am: e7dff2f955
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1751022 Change-Id: I8370822cd5c96e28b51a54759bced40d556fde84
This commit is contained in:
@@ -1069,11 +1069,12 @@ public class BpfCoordinator {
|
||||
throw new AssertionError("IP address array not valid IPv4 address!");
|
||||
}
|
||||
|
||||
final long ageMs = (now - value.lastUsed) / 1_000_000;
|
||||
return String.format("[%s] %d(%s) %s:%d -> %d(%s) %s:%d -> %s:%d [%s] %dms",
|
||||
final String ageStr = (value.lastUsed == 0) ? "-"
|
||||
: 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,
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user