[bgp/attribute] Make sure cleared MP_UNREACH_NLRI attribute size is consistent when rebuilding RIBs
This commit is contained in:
parent
ac6c224f72
commit
01c4311eb7
|
@ -341,7 +341,9 @@ Judgement Bgp_RebuildMsgFromRib(const Prefix *nlri,
|
||||||
goto error; // error already set
|
goto error; // error already set
|
||||||
|
|
||||||
// Rebuild attribute on the fly with original AFI and SAFI
|
// Rebuild attribute on the fly with original AFI and SAFI
|
||||||
Bgpattr *mpUnreach = (Bgpattr *) alloca(3 + 2 + 1);
|
attrSiz = 3 + 2 + 1;
|
||||||
|
|
||||||
|
Bgpattr *mpUnreach = (Bgpattr *) alloca(attrSiz);
|
||||||
mpUnreach->flags = flags;
|
mpUnreach->flags = flags;
|
||||||
mpUnreach->code = BGP_ATTR_MP_UNREACH_NLRI;
|
mpUnreach->code = BGP_ATTR_MP_UNREACH_NLRI;
|
||||||
mpUnreach->len = 3;
|
mpUnreach->len = 3;
|
||||||
|
|
Loading…
Reference in New Issue