commit | 03ea1bbc67da66ca3690d58a6b07d82e623804ce | [log] [tgz] |
---|---|---|
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Mon Sep 02 08:38:02 2024 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Sep 02 08:38:02 2024 +0000 |
tree | d04de5141a5286e98c916df6389656ca0e55f881 | |
parent | 68720b084d4e476ef9d4635798b74c1e86852224 [diff] | |
parent | 12f6e5c8e7b12de63af4796009d83f6619541e3f [diff] |
Merge "Return false when tetherOffloadRuleAdd doesn't really add items" into main am: c694c351c0 am: 12f6e5c8e7 Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3252331 Change-Id: I1898d701be63fede716728735acf9f0c5d1d4d62 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/Tethering/apishim/31/com/android/networkstack/tethering/apishim/api31/BpfCoordinatorShimImpl.java b/Tethering/apishim/31/com/android/networkstack/tethering/apishim/api31/BpfCoordinatorShimImpl.java index 4d1e7ef..e6e99f4 100644 --- a/Tethering/apishim/31/com/android/networkstack/tethering/apishim/api31/BpfCoordinatorShimImpl.java +++ b/Tethering/apishim/31/com/android/networkstack/tethering/apishim/api31/BpfCoordinatorShimImpl.java
@@ -359,6 +359,7 @@ } catch (IllegalStateException e) { // Silent if the rule already exists. Note that the errno EEXIST was rethrown as // IllegalStateException. See BpfMap#insertEntry. + return false; } return true; }
diff --git a/Tethering/apishim/common/com/android/networkstack/tethering/apishim/common/BpfCoordinatorShim.java b/Tethering/apishim/common/com/android/networkstack/tethering/apishim/common/BpfCoordinatorShim.java index d28a397..026b1c3 100644 --- a/Tethering/apishim/common/com/android/networkstack/tethering/apishim/common/BpfCoordinatorShim.java +++ b/Tethering/apishim/common/com/android/networkstack/tethering/apishim/common/BpfCoordinatorShim.java
@@ -140,6 +140,8 @@ /** * Adds a tethering IPv4 offload rule to appropriate BPF map. + * + * @return true iff the map was modified, false if the key already exists or there was an error. */ public abstract boolean tetherOffloadRuleAdd(boolean downstream, @NonNull Tether4Key key, @NonNull Tether4Value value);