Dump the unused IPv4 BPF rule age correctly am: e7dff2f955 am: e9deba21ad
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1751022 Change-Id: I3704db91381858a88f51972692af78f14e6d2e0c
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