summaryrefslogtreecommitdiff
path: root/src/main/java/com/lumaserv/bgp/protocol/attribute/ExtendedCommuntiesAttribute.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/lumaserv/bgp/protocol/attribute/ExtendedCommuntiesAttribute.java')
-rw-r--r--src/main/java/com/lumaserv/bgp/protocol/attribute/ExtendedCommuntiesAttribute.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/lumaserv/bgp/protocol/attribute/ExtendedCommuntiesAttribute.java b/src/main/java/com/lumaserv/bgp/protocol/attribute/ExtendedCommuntiesAttribute.java
index 759ae60..6909277 100644
--- a/src/main/java/com/lumaserv/bgp/protocol/attribute/ExtendedCommuntiesAttribute.java
+++ b/src/main/java/com/lumaserv/bgp/protocol/attribute/ExtendedCommuntiesAttribute.java
@@ -30,4 +30,12 @@ public class ExtendedCommuntiesAttribute implements PathAttribute {
return new byte[0];
}
+ public String toString() {
+ if (type == 0x03 && subType == 0x0b) {
+ // Color extended community
+ return String.format("color:%d", an);
+ }
+
+ return String.format("%d,%d,%d,%d", type, subType, as, an);
+ }
}