From cbe1c26a4a540fbcfb4eef57f97dbe9131dd370b Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 13 Nov 2023 21:52:23 +0100 Subject: Improve TunnelEncapsAttribute --- .../java/com/lumaserv/bgp/protocol/attribute/TunnelEncapsAttribute.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/lumaserv/bgp/protocol/attribute/TunnelEncapsAttribute.java b/src/main/java/com/lumaserv/bgp/protocol/attribute/TunnelEncapsAttribute.java index df3ee42..1f44199 100644 --- a/src/main/java/com/lumaserv/bgp/protocol/attribute/TunnelEncapsAttribute.java +++ b/src/main/java/com/lumaserv/bgp/protocol/attribute/TunnelEncapsAttribute.java @@ -189,6 +189,7 @@ public class TunnelEncapsAttribute implements PathAttribute { } offset += 2; + System.out.println("Tunnel: " + src + "," + offset + "," + publicKey); System.arraycopy(src, offset, publicKey, 0, 32); offset += 32; @@ -256,6 +257,7 @@ public class TunnelEncapsAttribute implements PathAttribute { @Override public String toString() { return "WireGuard:" + + ((flags & FLAG_TYPE_2) != 0 ? " type 2" : " type 1") + ((flags & FLAG_PERSISTENT_KEEPALIVE) != 0 ? " persistent keepalive:" + persistentKeepalive : "") + " public key:" + Base64.getEncoder().encodeToString(publicKey) + ((flags & FLAG_PROTOCOL_VERSION) != 0 ? " protocol version:" + protocolVersion : "") -- cgit v1.2.3