summaryrefslogtreecommitdiff
path: root/bgpd/bgp_community.h
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_community.h')
-rw-r--r--bgpd/bgp_community.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgp_community.h b/bgpd/bgp_community.h
index 31a061370d..b99f38ab64 100644
--- a/bgpd/bgp_community.h
+++ b/bgpd/bgp_community.h
@@ -61,8 +61,10 @@ struct community {
#define COMMUNITY_LOCAL_AS 0xFFFFFF03
#define COMMUNITY_NO_PEER 0xFFFFFF04
+#define COMMUNITY_SIZE 4
+
/* Macros of community attribute. */
-#define com_length(X) ((X)->size * 4)
+#define com_length(X) ((X)->size * COMMUNITY_SIZE)
#define com_lastval(X) ((X)->val + (X)->size - 1)
#define com_nthval(X,n) ((X)->val + (n))