Merge "BpfNetMaps: auto populate interface tracker" into main am: b9314970da
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3549344 Change-Id: I5a11dee634a6129fbf7710bf0b66a7b363950a8f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
6ef793e0f1
1 changed files with 6 additions and 3 deletions
|
|
@ -915,10 +915,13 @@ public class BpfNetMaps {
|
|||
final InetAddress address, final int protocol, final int remotePort,
|
||||
final boolean isAllowed) {
|
||||
throwIfPre25Q2("addLocalNetAccess is not available on pre-B devices");
|
||||
final int ifIndex;
|
||||
if (iface == null) {
|
||||
ifIndex = 0;
|
||||
} else {
|
||||
Log.e(TAG, "Null iface, skip addLocalNetAccess for " + address);
|
||||
return;
|
||||
}
|
||||
int ifIndex = mInterfaceTracker.getInterfaceIndex(iface);
|
||||
if (ifIndex == 0) {
|
||||
mInterfaceTracker.addInterface(iface);
|
||||
ifIndex = mInterfaceTracker.getInterfaceIndex(iface);
|
||||
}
|
||||
if (ifIndex == 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue