diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2020-04-06 01:22:44 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2020-04-06 01:22:44 +0530 |
commit | 1ca4dbf1a23ace033a8a04ea80b20be7dfd7b05c (patch) | |
tree | a6f5ba8068c7de96ae325a6416e495e9628eef88 /tunnel/src/main | |
parent | 065893e31d9746e67e0ab42a6dfe22e876d83c04 (diff) |
tunnel: hold peers in an ArrayList
A set will cause identical peers to be dropped during save
Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'tunnel/src/main')
-rw-r--r-- | tunnel/src/main/java/com/wireguard/config/Config.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tunnel/src/main/java/com/wireguard/config/Config.java b/tunnel/src/main/java/com/wireguard/config/Config.java index df344b1c..a183a75a 100644 --- a/tunnel/src/main/java/com/wireguard/config/Config.java +++ b/tunnel/src/main/java/com/wireguard/config/Config.java @@ -17,10 +17,8 @@ import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.LinkedHashSet; import java.util.List; import java.util.Objects; -import java.util.Set; import androidx.annotation.Nullable; @@ -187,7 +185,7 @@ public final class Config { @SuppressWarnings("UnusedReturnValue") public static final class Builder { // Defaults to an empty set. - private final Set<Peer> peers = new LinkedHashSet<>(); + private final ArrayList<Peer> peers = new ArrayList<>(); // No default; must be provided before building. @Nullable private Interface interfaze; |