summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2023-06-01 22:35:46 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2024-01-08 00:14:45 +0100
commit8996736a4d2b5947f8fc3b4460fb7ae69f2357bd (patch)
treea1224f4be1e37020333fbf96f95545c5a0c3739f
parente786b19646cc8ffd2c83db8cdb9457610d614ebd (diff)
tunnel: notify tunnel ep on link props change
Call onEndpointChange onLinkPropertiesChanged.
-rw-r--r--tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java
index 9c2afa9f..d40d18aa 100644
--- a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java
+++ b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java
@@ -881,6 +881,13 @@ public final class GoBackend implements Backend {
TunnelHandle tunnel = TunnelHandle.newBuilder().setHandle(currentTunnelHandle).build();
IpcSetRequest request = IpcSetRequest.newBuilder().setTunnel(tunnel).setConfig(goConfig).build();
IpcSetResponse resp = stub.ipcSet(request);
+
+ for (final Peer peer : currentConfig.getPeers()) {
+ final InetEndpoint ep = peer.getEndpoint().orElse(null);
+ if (ep == null)
+ continue;
+ currentTunnel.onEndpointChange(peer.getPublicKey(), ep);
+ }
}
}
}