]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Fix session reset issue caused by malformed core attributes 14134/head
authorSamanvitha B Bhargav <bsamanvitha@vmware.com>
Wed, 2 Aug 2023 06:10:35 +0000 (23:10 -0700)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Wed, 2 Aug 2023 17:49:02 +0000 (17:49 +0000)
commit188fc62333cf975c6cf4e0e70ad44246103733d7
tree1dbbb09b40d4918328b500f44e6bdd6af4d89126
parent6056702fba8dd47768603dbb061e6be8a1247e0a
bgpd: Fix session reset issue caused by malformed core attributes

RCA:
On encountering any attribute error for core attributes in update message,
the error handling is set to 'treat as withdraw' and
further parsing of the remaining attributes is skipped.
But the stream pointer is not being correctly adjusted to
point to the next NLRI field skipping the rest of the attributes.
This leads to incorrect parsing of the NLRI field,
which causes BGP session to reset.

Fix:
The stream pointer offset is rightly adjusted to point to the NLRI field correctly
when the malformed attribute is encountered and remaining attribute parsing is skipped.

Signed-off-by: Samanvitha B Bhargav <bsamanvitha@vmware.com>
(cherry picked from commit 70ff940fd1cbf920958116c558150ca5d3200eb8)
bgpd/bgp_attr.c