mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 01:57:26 +00:00
Merge pull request #8028 from ton31337/fix/aggregator_dump_attributes_if_zero
bgpd: Dump BGP attrs to check what's the actual prefix with aggr_as 0
This commit is contained in:
commit
7a0df480c4
@ -1754,12 +1754,21 @@ static int bgp_attr_aggregator(struct bgp_attr_parser_args *args)
|
|||||||
attr->aggregator_addr.s_addr = stream_get_ipv4(peer->curr);
|
attr->aggregator_addr.s_addr = stream_get_ipv4(peer->curr);
|
||||||
|
|
||||||
/* Codification of AS 0 Processing */
|
/* Codification of AS 0 Processing */
|
||||||
if (aggregator_as == BGP_AS_ZERO)
|
if (aggregator_as == BGP_AS_ZERO) {
|
||||||
flog_err(EC_BGP_ATTR_LEN,
|
flog_err(EC_BGP_ATTR_LEN,
|
||||||
"%s: AGGREGATOR AS number is 0 for aspath: %s",
|
"%s: AGGREGATOR AS number is 0 for aspath: %s",
|
||||||
peer->host, aspath_print(attr->aspath));
|
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);
|
attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_AGGREGATOR);
|
||||||
|
}
|
||||||
|
|
||||||
return BGP_ATTR_PARSE_PROCEED;
|
return BGP_ATTR_PARSE_PROCEED;
|
||||||
}
|
}
|
||||||
@ -1788,12 +1797,21 @@ bgp_attr_as4_aggregator(struct bgp_attr_parser_args *args,
|
|||||||
as4_aggregator_addr->s_addr = stream_get_ipv4(peer->curr);
|
as4_aggregator_addr->s_addr = stream_get_ipv4(peer->curr);
|
||||||
|
|
||||||
/* Codification of AS 0 Processing */
|
/* Codification of AS 0 Processing */
|
||||||
if (aggregator_as == BGP_AS_ZERO)
|
if (aggregator_as == BGP_AS_ZERO) {
|
||||||
flog_err(EC_BGP_ATTR_LEN,
|
flog_err(EC_BGP_ATTR_LEN,
|
||||||
"%s: AS4_AGGREGATOR AS number is 0 for aspath: %s",
|
"%s: AS4_AGGREGATOR AS number is 0 for aspath: %s",
|
||||||
peer->host, aspath_print(attr->aspath));
|
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);
|
attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_AS4_AGGREGATOR);
|
||||||
|
}
|
||||||
|
|
||||||
return BGP_ATTR_PARSE_PROCEED;
|
return BGP_ATTR_PARSE_PROCEED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user