summaryrefslogtreecommitdiffhomepage
path: root/pkg/packet/bgp/bgp.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/packet/bgp/bgp.go')
-rw-r--r--pkg/packet/bgp/bgp.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/packet/bgp/bgp.go b/pkg/packet/bgp/bgp.go
index ccc3db8e..30a1a41c 100644
--- a/pkg/packet/bgp/bgp.go
+++ b/pkg/packet/bgp/bgp.go
@@ -12114,6 +12114,10 @@ func (c *LargeCommunity) String() string {
return fmt.Sprintf("%d:%d:%d", c.ASN, c.LocalData1, c.LocalData2)
}
+func (c *LargeCommunity) Eq(rhs *LargeCommunity) bool {
+ return c.ASN == rhs.ASN && c.LocalData1 == rhs.LocalData1 && c.LocalData2 == rhs.LocalData2
+}
+
func NewLargeCommunity(asn, data1, data2 uint32) *LargeCommunity {
return &LargeCommunity{
ASN: asn,