[lonetix/bgp] Check for AGGREGATOR4 presence before checking its correctness

This commit is contained in:
Lorenzo Cogotti 2021-10-18 11:45:17 +02:00
parent 631ee335d8
commit bfdde40031
1 changed files with 8 additions and 6 deletions

View File

@ -547,13 +547,15 @@ Bgpattr *Bgp_GetRealAggregator(const Bgpattrseg *tpa,
if (Bgp_GetErrStat(NULL))
return NULL; // forward error
if (!BGP_CHKAGGRSIZ(attr4, TRUE)) {
Bgp_SetErrStat(BGPEBADAGGR4);
return NULL;
}
if (attr4) {
if (!BGP_CHKAGGRSIZ(attr4, TRUE)) {
Bgp_SetErrStat(BGPEBADAGGR4);
return NULL;
}
attr = attr4;
asn32bit = TRUE;
attr = attr4;
asn32bit = TRUE;
}
}
*isAsn32bit = asn32bit;