commit | c694c351c05e0909f3b4375abd550ab5fa12a6d1 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Mon Sep 02 08:18:57 2024 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Mon Sep 02 08:18:57 2024 +0000 |
tree | 88e2b6e0a82ec79fd4a5113b18767fd76448946e | |
parent | b8950d144a2bc13b34d24fde3a4248623cb78008 [diff] | |
parent | 7b4e31888952fe11dcd1abcc5695d26f80ca38a3 [diff] |
Merge "Return false when tetherOffloadRuleAdd doesn't really add items" into main
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);