attr->aggregator_addr.s_addr = stream_get_ipv4(peer->curr);
/* Codification of AS 0 Processing */
- if (aggregator_as == BGP_AS_ZERO)
+ if (aggregator_as == BGP_AS_ZERO) {
flog_err(EC_BGP_ATTR_LEN,
"%s: AGGREGATOR AS number is 0 for aspath: %s",
peer->host, aspath_print(attr->aspath));
- else
+
+ if (bgp_debug_update(peer, NULL, NULL, 1)) {
+ char attr_str[BUFSIZ] = {0};
+
+ bgp_dump_attr(attr, attr_str, sizeof(attr_str));
+
+ zlog_debug("%s: attributes: %s", __func__, attr_str);
+ }
+ } else {
attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_AGGREGATOR);
+ }
return BGP_ATTR_PARSE_PROCEED;
}
as4_aggregator_addr->s_addr = stream_get_ipv4(peer->curr);
/* Codification of AS 0 Processing */
- if (aggregator_as == BGP_AS_ZERO)
+ if (aggregator_as == BGP_AS_ZERO) {
flog_err(EC_BGP_ATTR_LEN,
"%s: AS4_AGGREGATOR AS number is 0 for aspath: %s",
peer->host, aspath_print(attr->aspath));
- else
+
+ if (bgp_debug_update(peer, NULL, NULL, 1)) {
+ char attr_str[BUFSIZ] = {0};
+
+ bgp_dump_attr(attr, attr_str, sizeof(attr_str));
+
+ zlog_debug("%s: attributes: %s", __func__, attr_str);
+ }
+ } else {
attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_AS4_AGGREGATOR);
+ }
return BGP_ATTR_PARSE_PROCEED;
}