<div dir="ltr">Hi!<br>According to RFC 8277, NLRI for withdrawal contains 3 fields: Length, Compatibility and Prefix.<br>"Upon transmission, the Compatibility field SHOULD be set to 0x800000.Upon reception, the value of the Compatibility field MUST be ignored."<br><div>Right now, BIRD 2.0.2 checks Compatibility field for value 0x800000, and this is not compatible with RFC, and at least Juniper MX do not set this field to 0x800000, and BGP session between BIRD and Juniper resets with Malformed Attribute List.</div><div>Attached patch fixes this behavior.</div><div><br></div><div>diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c<br>index 190fd6f..5dcb00d 100644<br>--- a/proto/bgp/packets.c<br>+++ b/proto/bgp/packets.c<br>@@ -1165,8 +1165,11 @@ bgp_decode_mpls_labels(struct bgp_parse_state *s, byte **pos, uint *len, uint *p<br>     ADVANCE(*pos, *len, 3);<br>     *pxlen -= 24;<br> <br>-    /* Withdraw: Magic label stack value 0x800000 according to RFC 3107, section 3, last paragraph */<br>-    if (!a && !s->err_withdraw && (lnum == 1) && (label == BGP_MPLS_MAGIC))<br>+    /*<br>+     * Withdraw: According to RFC 3107, section 2.4, second paragraph<br>+     * Upon reception, the value of the Compatibility field MUST be ignored.<br>+     */<br>+    if (!a && !s->err_withdraw && (lnum == 1) && (s->mp_unreach_len))<br>       break;<br>   }<br>   while (!(label & BGP_MPLS_BOS));<br></div></div>