From f018bfcb43aa4846a037d8a7884a1a28b3e66516 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 19 Jul 2020 19:42:18 -0400 Subject: [PATCH] Fix BGP parameter usage --- src/bgp_client.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bgp_client.rs b/src/bgp_client.rs index dc5c673..d2b3443 100644 --- a/src/bgp_client.rs +++ b/src/bgp_client.rs @@ -145,7 +145,6 @@ impl RoutingTable { NLRIEncoding::IP_MPLS_WITH_PATH_ID(_) => (), NLRIEncoding::IP_VPN_MPLS(_) => (), NLRIEncoding::L2VPN(_) => (), - NLRIEncoding::FLOWSPEC(_) => (), }; } @@ -176,7 +175,6 @@ impl RoutingTable { NLRIEncoding::IP_MPLS_WITH_PATH_ID(_) => (), NLRIEncoding::IP_VPN_MPLS(_) => (), NLRIEncoding::L2VPN(_) => (), - NLRIEncoding::FLOWSPEC(_) => (), }; } } @@ -222,6 +220,9 @@ impl codec::Decoder for MsgCoder { match reader.read() { Ok((_header, msg)) => { decoder.buf.advance(decoder.pos); + if let Message::Open(ref o) = &msg { + self.0 = Some(Capabilities::from_parameters(o.parameters.clone())); + } Ok(Some(msg)) }, Err(e) => match e.kind() { -- 2.39.5