Do not enable ingress rate limit until clsact qdisc exists am: f1fe8ee928

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2003978

Change-Id: I81ef8189ca04738b16a584e079e73ffa92e31a9f
This commit is contained in:
Patrick Rohr
2022-03-02 20:15:09 +00:00
committed by Automerger Merge Worker
2 changed files with 19 additions and 14 deletions

View File

@@ -1998,6 +1998,13 @@ public class ConnectivityServiceTest {
// updated. Check that this happened.
assertEquals(-1L, (long) mActiveRateLimit.getOrDefault(iface, -1L));
mActiveRateLimit.put(iface, rateInBytesPerSecond);
// verify that clsact qdisc has already been created, otherwise attaching a tc police
// filter will fail.
try {
verify(mMockNetd).networkAddInterface(anyInt(), eq(iface));
} catch (RemoteException e) {
fail(e.getMessage());
}
}
@Override