]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Ignore handling NLRIs if we received MP_UNREACH_NLRI 14735/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Sun, 29 Oct 2023 20:44:45 +0000 (22:44 +0200)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Sun, 5 Nov 2023 16:31:57 +0000 (16:31 +0000)
commit250844bbcabcc55d9cc009c0769718a4f2a1e166
treee480aa01334fd5a490b298ef6df6b89c3aa0265f
parent837f57f087c997e3d66f7d1f86bdec3149917aba
bgpd: Ignore handling NLRIs if we received MP_UNREACH_NLRI

If we receive MP_UNREACH_NLRI, we should stop handling remaining NLRIs if
no mandatory path attributes received.

In other words, if MP_UNREACH_NLRI received, the remaining NLRIs should be handled
as a new data, but without mandatory attributes, it's a malformed packet.

In normal case, this MUST not happen at all, but to avoid crashing bgpd, we MUST
handle that.

Reported-by: Iggy Frankovic <iggyfran@amazon.com>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit c37119df45bbf4ef713bc10475af2ee06e12f3bf)
bgpd/bgp_attr.c
bgpd/bgp_attr.h
bgpd/bgp_packet.c