[lonetix/bgp] Check for AGGREGATOR4 presence before checking its correctness
This commit is contained in:
parent
631ee335d8
commit
bfdde40031
|
@ -547,6 +547,7 @@ Bgpattr *Bgp_GetRealAggregator(const Bgpattrseg *tpa,
|
||||||
if (Bgp_GetErrStat(NULL))
|
if (Bgp_GetErrStat(NULL))
|
||||||
return NULL; // forward error
|
return NULL; // forward error
|
||||||
|
|
||||||
|
if (attr4) {
|
||||||
if (!BGP_CHKAGGRSIZ(attr4, TRUE)) {
|
if (!BGP_CHKAGGRSIZ(attr4, TRUE)) {
|
||||||
Bgp_SetErrStat(BGPEBADAGGR4);
|
Bgp_SetErrStat(BGPEBADAGGR4);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -555,6 +556,7 @@ Bgpattr *Bgp_GetRealAggregator(const Bgpattrseg *tpa,
|
||||||
attr = attr4;
|
attr = attr4;
|
||||||
asn32bit = TRUE;
|
asn32bit = TRUE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*isAsn32bit = asn32bit;
|
*isAsn32bit = asn32bit;
|
||||||
return attr; // error already cleared
|
return attr; // error already cleared
|
||||||
|
|
Loading…
Reference in New Issue