if (CHECK_FLAG(peer->af_flags[afi][safi],
PEER_FLAG_SEND_LARGE_COMMUNITY)
&& (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES))) {
- if (attr->lcommunity->size * 12 > 255) {
+ if (attr->lcommunity->size * LCOMMUNITY_SIZE > 255) {
stream_putc(s, BGP_ATTR_FLAG_OPTIONAL
| BGP_ATTR_FLAG_TRANS
| BGP_ATTR_FLAG_EXTLEN);
stream_putc(s, BGP_ATTR_LARGE_COMMUNITIES);
- stream_putw(s, attr->lcommunity->size * 12);
+ stream_putw(s, attr->lcommunity->size * LCOMMUNITY_SIZE);
} else {
stream_putc(s, BGP_ATTR_FLAG_OPTIONAL
| BGP_ATTR_FLAG_TRANS);
stream_putc(s, BGP_ATTR_LARGE_COMMUNITIES);
- stream_putc(s, attr->lcommunity->size * 12);
+ stream_putc(s, attr->lcommunity->size * LCOMMUNITY_SIZE);
}
stream_put(s, attr->lcommunity->val,
- attr->lcommunity->size * 12);
+ attr->lcommunity->size * LCOMMUNITY_SIZE);
}
/* Route Reflector. */
/* Large Community attribute. */
if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES)) {
- if (attr->lcommunity->size * 12 > 255) {
+ if (attr->lcommunity->size * LCOMMUNITY_SIZE > 255) {
stream_putc(s, BGP_ATTR_FLAG_OPTIONAL
| BGP_ATTR_FLAG_TRANS
| BGP_ATTR_FLAG_EXTLEN);
stream_putc(s, BGP_ATTR_LARGE_COMMUNITIES);
- stream_putw(s, attr->lcommunity->size * 12);
+ stream_putw(s, attr->lcommunity->size * LCOMMUNITY_SIZE);
} else {
stream_putc(s, BGP_ATTR_FLAG_OPTIONAL
| BGP_ATTR_FLAG_TRANS);
stream_putc(s, BGP_ATTR_LARGE_COMMUNITIES);
- stream_putc(s, attr->lcommunity->size * 12);
+ stream_putc(s, attr->lcommunity->size * LCOMMUNITY_SIZE);
}
stream_put(s, attr->lcommunity->val,
- attr->lcommunity->size * 12);
+ attr->lcommunity->size * LCOMMUNITY_SIZE);
}
/* Add a MP_NLRI attribute to dump the IPv6 next hop */
if (!first)
str_buf[str_pnt++] = ' ';
- pnt = lcom->val + (i * 12);
+ pnt = lcom->val + (i * LCOMMUNITY_SIZE);
globaladmin = (*pnt++ << 24);
globaladmin |= (*pnt++ << 16);
/* Every community on com2 needs to be on com1 for this to match */
while (i < lcom1->size && j < lcom2->size) {
- if (memcmp(lcom1->val + (i * 12), lcom2->val + (j * 12),
+ if (memcmp(lcom1->val + (i * LCOMMUNITY_SIZE), lcom2->val + (j * LCOMMUNITY_SIZE),
LCOMMUNITY_SIZE)
== 0)
j++;