summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_ecommunity.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c
index 1e95d401aa..5a053a7f34 100644
--- a/bgpd/bgp_ecommunity.c
+++ b/bgpd/bgp_ecommunity.c
@@ -934,7 +934,7 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter)
strlcat(str_buf, " ", str_size);
/* Retrieve value field */
- pnt = ecom->val + (i * 8);
+ pnt = ecom->val + (i * ecom->unit_size);
/* High-order octet is the type */
type = *pnt++;