diff --git a/protocols/bgp/packet/community.go b/protocols/bgp/packet/community.go
index 5fd0f29a3bb95c685de17e5bab067151dc03e13c..c49483d0099411cd821a6a07ec11d30824e1a17a 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)
 }