CAIDA / libparsebgp

Lightweight parser for binary BGP, BMP and MRT routing data
https://bgpstream.caida.org
BSD 2-Clause "Simplified" License
8 stars 8 forks source link

Improve handling of truncated BGP messages #48

Closed kenkeys closed 5 years ago

kenkeys commented 5 years ago

parsebgp_mrt_decode() returns the new error code PARSEBGP_TRUNCATED_MSG instead of PARSEBGP_INVALID_MSG, and updates the decoded length, when an MRT mesage is too short to contain a full BGP message, giving the caller the option to continue with the next MRT message.

tools/parsebgp takes advantage of this according to its -i option.

(Example case: routeviews.route-views2.updates.1212316500)