Re: [Idr] [BULK] Bug in draft-ietf-idr-rfc5575bis, worth fixing?

"Dongjie (Jimmy)" <> Wed, 30 September 2020 07:53 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 5B41A3A12A7; Wed, 30 Sep 2020 00:53:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id LPbXUonn59qg; Wed, 30 Sep 2020 00:53:31 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 551703A0A29; Wed, 30 Sep 2020 00:53:31 -0700 (PDT)
Received: from (unknown []) by Forcepoint Email with ESMTP id 9E8578E44A44C02A07B5; Wed, 30 Sep 2020 08:53:29 +0100 (IST)
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1913.5; Wed, 30 Sep 2020 08:53:28 +0100
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Wed, 30 Sep 2020 15:53:26 +0800
Received: from ([]) by ([]) with mapi id 15.01.1913.007; Wed, 30 Sep 2020 15:53:26 +0800
From: "Dongjie (Jimmy)" <>
To: Robert Raszuk <>, "Jakob Heitz (jheitz)" <>
CC: "idr@ietf. org" <>, John Scudder <>, "" <>, "" <>, Hares Susan <>
Thread-Topic: [Idr] [BULK] Bug in draft-ietf-idr-rfc5575bis, worth fixing?
Thread-Index: AQHWli37cYF77egQDk6J8rBqJEg0bKmAzkww
Date: Wed, 30 Sep 2020 07:53:25 +0000
Message-ID: <>
References: <> <22341_1601052988_5F6E213C_22341_268_1_53C29892C857584299CBF5D05346208A48F82C17@OPEXCAUBM43.corporate.adroot.infra.ftgroup> <> <3366_1601300732_5F71E8FC_3366_6_3_53C29892C857584299CBF5D05346208A48F86028@OPEXCAUBM43.corporate.adroot.infra.ftgroup> <> <> <> <> <> <>
In-Reply-To: <>
Accept-Language: en-US, zh-CN
Content-Language: zh-CN
x-originating-ip: []
Content-Type: multipart/alternative; boundary="_000_eaf30ef00cff4e3ca7d610fb48f8aa7dhuaweicom_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <>
Subject: Re: [Idr] [BULK] Bug in draft-ietf-idr-rfc5575bis, worth fixing?
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Inter-Domain Routing <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 30 Sep 2020 07:53:35 -0000

Hi Robert and Jakob,

Please note that section 3 of 5575bis says:

“BGP itself treats the NLRI as a key to an entry in its databases. Entries that are placed in the Loc-RIB are then associated with a given set of semantics, which is application dependent.”

Although comparing with RFC5575 the word “opaque” is removed, the NLRI is still treated as the key.

Best regards,

From: Idr [] On Behalf Of Robert Raszuk
Sent: Tuesday, September 29, 2020 2:58 PM
To: Jakob Heitz (jheitz) <>
Cc: idr@ietf. org <>; John Scudder <>;;; Hares Susan <>
Subject: Re: [Idr] [BULK] Bug in draft-ietf-idr-rfc5575bis, worth fixing?

Hi Jakob,

> Flowspec does not AFAIK have any such NLRI... yet.

I am not quite sure what are you trying to say above.

Today in RFC5575 NLRI is clearly defined as a numeric value with a given length. It was by design not parsable by BGP. The entire NLRI is a key.

So updates and withdraws processing happens on the key as defined.

Now if we start to parse that value (except maybe for validation which I am also now pretty sceptical about) and dissecting part of that calling some types to be a key and some not - at min IMHO we should use different SAFI not to create complete deployment issues.

Many thx,

On Tue, Sep 29, 2020 at 1:23 AM Jakob Heitz (jheitz) <<>> wrote:
Also to consider that in BGP, there are several examples of NLRI
where the NLRI key is not the whole NLRI, starting with RFC 3107,
where the label is not part of the key.

A speaker that receives an update with an unknown NLRI does not
know if that unknown NLRI servers to withdraw a (seemingly)
different unknown NLRI, if the parts that are different are not
key material.

Therefore, a BGP speaker must always be able to completely
parse and understand received NLRI.

Flowspec does not AFAIK have any such NLRI... yet.


From: Idr <<>> On Behalf Of Robert Raszuk
Sent: Monday, September 28, 2020 1:44 PM
To: Christoph Loibl <<>>
Cc: idr@ietf. org <<>>;<>; John Scudder <<>>;<>; Hares Susan <<>>
Subject: Re: [Idr] [BULK] Bug in draft-ietf-idr-rfc5575bis, worth fixing?


To me the real question is if we really should validate the content of NLRI or just make sure that NLRI boundaries meet BGP MP_REACH definition and treat NLRI values completely opaque to BGP (as per original RFC5575).

If NLRI is really malformed resulting in MP_REACH attribute being malformed I do not see that much harm in session reset.

But if we dive into each atomic type parsing of the NLRI value itself at each BGP speaker talking SAFI 133/134 I think this is going to be a mess.


On Mon, Sep 28, 2020 at 9:41 PM Christoph Loibl <<>> wrote:

I do not really want to repeat the whole discussion here (seems that we are going in circles) if not needed. I think that we agreed that if the NLRI is malformed the only option is to reset (+send notification) the session (even if we consider rfc7606). And from draft-rfc5575bis it is clear that we are talking about a malformed NLRI:

   A NLRI value not encoded as specified specified here is considered

   malformed and error handling according to Section 10 is performed.

-> I think that adding the small term that John suggested is sufficient.

Cheers Christoph

Christoph Loibl<> | CL8-RIPE | PGP-Key-ID: 0x4B2C0055 |

On 28.09.2020, at 21:16, Alvaro Retana <<>> wrote:

[Explicitly adding Jeff to the To list.]


During my AD review there was a discussion on the list about this point, and whether we could avoid resetting the session.  Jeff presented some examples and, I think, made a very convincing case of why we really can’t: even if we can look at the length, we would still be guessing.

I think this is one of the messages:

Jeff: if you get a chance, please chime in.



On September 28, 2020 at 2:16:38 PM, John Scudder (<>) wrote:

I think that is the right thing, too: FS uses T,V and not T,L,V for its component types, the lengths are implicit. So, if my parser encounters an unknown type code it is impossible for me to know how to skip over that type code. At that point, parsing breaks down.
[Bruno] I had in mind the higher level of hierarchy:

   The NLRI field of the MP_REACH_NLRI and MP_UNREACH_NLRI is encoded as
   one or more 2-tuples of the form <length, NLRI value>.  It consists
   of a 1- or 2-octet length field followed by a variable-length NLRI
   value.  The length is expressed in octets.

                     |    length (0xnn or 0xfnnn)    |
                     |    NLRI value   (variable)    |

                Figure 1: Flow Specification NLRI for IPv4

At this level, assuming that the NLRI value is found semantically incorrect, it seems to me that one could:
-          Skip this NLRI (thanks to the ‘length’ field) and continue with the next NLRI
-          Read the ‘NLRI value’ as an opaque data, and treat this NLRI as withdraw. (In the context of the discussion, this NLRI would never had been accepted, so ‘treat-as-withdraw’  could even be replaced with ‘ignore’. But I’m _not_ calling for this).
Hence it seems to me that treat-as-withdraw is technically possible.

Fair enough. It’s a little unfortunate that the draft contains this ambiguity; in retrospect it would have been better to be explicit about the error-handling strategy chosen rather than simply referencing RFC 7606. Whether or not we want to respin the draft in order to clarify it, is a question for the WG. If we were to make a change, it could potentially be the addition of this sentence, in Section 10:

   Error handling according to [RFC7606<>] and [RFC4760<>] applies to this

   specification. Notably, an NLRI that is found to be semantically

   incorrect (for example due to an unknown component type) MUST be

   handled using the “treat-as-withdraw” strategy (which in this case,

   it must be noted, works out to be the same as skipping over the NLRI).