From bbbcfd7a0df06abd10599fb7f4bb5928964ca883 Mon Sep 17 00:00:00 2001
From: Daniel Czerwonk <daniel@dan-nrw.de>
Date: Fri, 1 Jun 2018 18:04:29 +0200
Subject: [PATCH] little performance optimization

---
 protocols/bgp/packet/community.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/protocols/bgp/packet/community.go b/protocols/bgp/packet/community.go
index 5fd0f29a..c49483d0 100644
--- a/protocols/bgp/packet/community.go
+++ b/protocols/bgp/packet/community.go
@@ -8,7 +8,7 @@ import (
 
 func CommunityStringForUint32(v uint32) string {
 	e1 := v >> 16
-	e2 := v - e1<<16
+	e2 := v & 0x0000FFFF
 
 	return fmt.Sprintf("(%d,%d)", e1, e2)
 }
-- 
GitLab