Skip to main content

parse_bgp_update_message

Function parse_bgp_update_message 

Source
pub fn parse_bgp_update_message(
    input: Bytes,
    add_path: bool,
    asn_len: &AsnLength,
) -> Result<BgpUpdateMessage, ParserError>
Expand description

read bgp update message.

RFC: https://tools.ietf.org/html/rfc4271#section-4.3

Per RFC 7606, NLRI parse errors are non-fatal: the message is returned with partial data and a BgpValidationWarning::MalformedNlri appended to attributes.validation_warnings. Callers that want RFC 7606 treat-as-withdrawal semantics can inspect the warnings and act accordingly. Attribute-section framing errors (wrong length fields, truncated data) remain fatal.