Add IPv6 Handling for DSCP Policies and Support Interfaces with MAC Addresses

Add bpf functionality to handle IPv6 packets and apply
DSCP value.
Also support DSCP policy rules on multiple interfaces
simultaneously.

Test: atest DscpPolicyTest

Bug: 217166486
Change-Id: I452a87355fd0382a4c38b84aa3465505951d9bf0
This commit is contained in:
Tyler Wear
2022-02-03 15:14:44 -08:00
parent 7f85379b07
commit 3ad8089d19
6 changed files with 635 additions and 320 deletions

View File

@@ -3669,7 +3669,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
}
case NetworkAgent.EVENT_REMOVE_ALL_DSCP_POLICIES: {
if (mDscpPolicyTracker != null) {
mDscpPolicyTracker.removeAllDscpPolicies(nai);
mDscpPolicyTracker.removeAllDscpPolicies(nai, true);
}
break;
}
@@ -4410,6 +4410,9 @@ public class ConnectivityService extends IConnectivityManager.Stub
}
private void destroyNativeNetwork(@NonNull NetworkAgentInfo nai) {
if (mDscpPolicyTracker != null) {
mDscpPolicyTracker.removeAllDscpPolicies(nai, false);
}
try {
mNetd.networkDestroy(nai.network.getNetId());
} catch (RemoteException | ServiceSpecificException e) {