summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2023-11-13 21:52:23 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2023-11-13 21:52:23 +0100
commitcbe1c26a4a540fbcfb4eef57f97dbe9131dd370b (patch)
treeecc8c7775f461c3590f11197b387b3938ad746a9
parent501f0c20c65427a228efb58ca14cad7f5fbd362a (diff)
Improve TunnelEncapsAttribute
-rw-r--r--src/main/java/com/lumaserv/bgp/protocol/attribute/TunnelEncapsAttribute.java2
1 files changed, 2 insertions, 0 deletions
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 : "")