Browse Source

[bgp/attribute] Make sure EXTENDED attribute bit is off when clearing MP_UNREACH_NLRI during RIB rebuild

master
Lorenzo Cogotti 1 year ago
parent
commit
3ab2e69bb2
  1. 3
      lonetix/bgp/attribute.c

3
lonetix/bgp/attribute.c

@ -335,7 +335,6 @@ Judgement Bgp_RebuildMsgFromRib(const Prefix *nlri,
}
if (flags & BGPF_CLEARUNREACH) {
// Keep the attribute, but clear its contents
Uint8 flags = attr->flags;
const Bgpmpfam *srcFam = Bgp_GetMpFamily(attr);
if (!srcFam)
goto error; // error already set
@ -344,7 +343,7 @@ Judgement Bgp_RebuildMsgFromRib(const Prefix *nlri,
attrSiz = 3 + 2 + 1;
Bgpattr *mpUnreach = (Bgpattr *) alloca(attrSiz);
mpUnreach->flags = flags;
mpUnreach->flags = attr->flags & ~BGP_ATTR_EXTENDED;
mpUnreach->code = BGP_ATTR_MP_UNREACH_NLRI;
mpUnreach->len = 3;

Loading…
Cancel
Save