From f1712424eb5ed79dffc30d361f29d8c5870fb4a5 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Tue, 30 Apr 2024 15:30:03 -0300 Subject: [PATCH] bgp: display correct error subcode in operational data Signed-off-by: Renato Westphal --- holo-bgp/src/northbound/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/holo-bgp/src/northbound/state.rs b/holo-bgp/src/northbound/state.rs index 4c2d8c0b..f341441d 100644 --- a/holo-bgp/src/northbound/state.rs +++ b/holo-bgp/src/northbound/state.rs @@ -447,7 +447,7 @@ fn load_callbacks() -> Callbacks { .path(bgp::neighbors::neighbor::errors::sent::last_error_subcode::PATH) .get_element_u8(|_instance, args| { let nbr = args.list_entry.as_neighbor().unwrap(); - nbr.notification_sent.as_ref().map(|(_, notif)| notif.error_code) + nbr.notification_sent.as_ref().map(|(_, notif)| notif.error_subcode) }) .path(bgp::neighbors::neighbor::errors::sent::last_error_data::PATH) .get_element_binary(|_instance, args| {