]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Ignore handling NLRIs if we received MP_UNREACH_NLRI
authorDonatas Abraitis <donatas@opensourcerouting.org>
Sun, 29 Oct 2023 20:44:45 +0000 (22:44 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 31 Oct 2023 15:22:00 +0000 (17:22 +0200)
commitc37119df45bbf4ef713bc10475af2ee06e12f3bf
tree56d0bc880f64cfb61425587d47702bb8fb1de665
parent6814f2e0138a6ea5e1f83bdd9085d9a77999900b
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>
bgpd/bgp_attr.c
bgpd/bgp_attr.h
bgpd/bgp_packet.c