From: Matt Corallo Date: Sun, 19 Jul 2020 23:42:18 +0000 (-0400) Subject: Fix BGP parameter usage X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=dnsseed-rust;a=commitdiff_plain;h=f018bfcb43aa4846a037d8a7884a1a28b3e66516 Fix BGP parameter usage --- 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() {