bad attribute flags - ibgp

Hello,

I have an issue with ibgp peer flapping with the below error.

Log Message; {l_addr: x.x.x.90@*4, r_addr: x.x.x.x@*4} Received Notification [ code: (3,4), msg: (UPDATE error: bad attribute flags), data: D011000E02030000FDFC0000FFF000021BC1]

To me, the extended length flag is being set incorrectly from the MikroTik. Is this a bug?

Please see packet capture.

model: CCR2004-16G-2S+
revision: r3
firmware-type: al64
current-firmware: 7.20.8

Peer device; MS Server 2022 Version 21H2

BGP Configuration

name="0034 internal server test" instance=instance-1
remote.address=x.x.x.10 .as=65039
local.address=x.x.x.90 .role=ibgp
routing-table=0034 vrf=0034 as=65039 nexthop-choice=force-self multihop=yes
output.redistribute=bgp .filter-chain=plc-BGP-0034-internal-export
input.filter=plc-BGP-0034-internal-server-import

chain=plc-BGP-0034-internal-export rule="if (protocol bgp && dst == 10.0.0.0/8 || dst == 172.16.0.0/12) { set bgp-local-pref 200; accept}"
chain=plc-BGP-0034-internal-export rule="if (protocol bgp && dst in 10.0.0.0/8 || dst in 172.16.0.0/12 || dst in 192.168.0.0/16) {reject} else {accept}"
chain=plc-BGP-0034-internal-export rule="if (protocol bgp && dst == 0.0.0.0/0) {reject} else {set bgp-local-pref 200; accept}"

chain=plc-BGP-0034-internal-server-import rule="if (dst in 0.0.0.0/0) {reject}

Please be aware, the same setup works fine on a Juniper ACX which the MikroTik is replacing.

If extended length flag is set, then length is 2 octets and should be parsed as such, not hard coded single octet. It looks like MS server is using some kind of outdatedBGP implementation, which does not even support 4byte ASN, which lead to believe that it does not properly support extended length, too.