mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 21:01:42 +00:00
Merge pull request #8019 from ton31337/fix/bgpd_aggregator_0
bgpd: Unset only aggregator flag when AGGREGATOR_AS is 0
This commit is contained in:
commit
503f20e40e
@ -1750,18 +1750,16 @@ static int bgp_attr_aggregator(struct bgp_attr_parser_args *args)
|
|||||||
else
|
else
|
||||||
aggregator_as = stream_getw(peer->curr);
|
aggregator_as = stream_getw(peer->curr);
|
||||||
|
|
||||||
|
attr->aggregator_as = aggregator_as;
|
||||||
|
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 {
|
else
|
||||||
attr->aggregator_as = aggregator_as;
|
|
||||||
attr->aggregator_addr.s_addr = stream_get_ipv4(peer->curr);
|
|
||||||
|
|
||||||
/* Set atomic aggregate flag. */
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
@ -1786,17 +1784,16 @@ bgp_attr_as4_aggregator(struct bgp_attr_parser_args *args,
|
|||||||
|
|
||||||
aggregator_as = stream_getl(peer->curr);
|
aggregator_as = stream_getl(peer->curr);
|
||||||
|
|
||||||
|
*as4_aggregator_as = aggregator_as;
|
||||||
|
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 {
|
else
|
||||||
*as4_aggregator_as = aggregator_as;
|
|
||||||
as4_aggregator_addr->s_addr = stream_get_ipv4(peer->curr);
|
|
||||||
|
|
||||||
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