diff options
Diffstat (limited to 'tunnel/src/main/java/com/wireguard/android/backend/Bgp.java')
-rw-r--r-- | tunnel/src/main/java/com/wireguard/android/backend/Bgp.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tunnel/src/main/java/com/wireguard/android/backend/Bgp.java b/tunnel/src/main/java/com/wireguard/android/backend/Bgp.java index 12668621..a6a8b420 100644 --- a/tunnel/src/main/java/com/wireguard/android/backend/Bgp.java +++ b/tunnel/src/main/java/com/wireguard/android/backend/Bgp.java @@ -23,6 +23,7 @@ import com.lumaserv.bgp.protocol.attribute.PathAttribute; import com.lumaserv.bgp.protocol.attribute.TunnelEncapsAttribute; import com.lumaserv.bgp.protocol.message.BGPUpdate; +import com.wireguard.android.backend.Backend; import com.wireguard.config.InetEndpoint; import com.wireguard.config.InetNetwork; import com.wireguard.crypto.Key; @@ -53,12 +54,14 @@ public class Bgp implements BGPListener { private static final int PORT = 0; private static final int STATS_TAG = 1; // FIXME - private ManagedChannel channel; - private Tunnel tunnel; - private int tunnelHandle; + private final Backend backend; + private final ManagedChannel channel; + private final Tunnel tunnel; + private final int tunnelHandle; private BGPServer server; - public Bgp(ManagedChannel channel, Tunnel tunnel, int tunnelHandle) { + public Bgp(Backend backend, ManagedChannel channel, Tunnel tunnel, int tunnelHandle) { + this.backend = backend; this.channel = channel; this.tunnel = tunnel; this.tunnelHandle = tunnelHandle; @@ -196,7 +199,8 @@ public class Bgp implements BGPListener { } tunnel.onAllowedIpsChange(publicKey, addNetworks, removeNetworks); - + // backend.addAllowedIps(tunnel, publicKey, addNetworks); + // backend.removeAllowedIps(tunnel, publicKey, addNetworks); // TODO } catch (KeyFormatException ex) { Log.w(TAG, "Key.fromBytes " + ex); } |