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>2023-10-26 22:52:16 +0200
commit5f6e909e610147c9f0d38e72457c79896c3e3e04 (patch)
tree0a0e6af93cc6d795bdf556cf83434b0b0037121f
parentc6f1fddf2e52ce2d4e50c5e6d1931765ada1fe7e (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 f53a1fc9..6bd42936 100644
--- a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java
+++ b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java
@@ -879,6 +879,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);
+ }
}
}
}