]> git.bitcoin.ninja Git - dnsseed-rust/commitdiff
Fix BGP parameter usage
authorMatt Corallo <git@bluematt.me>
Sun, 19 Jul 2020 23:42:18 +0000 (19:42 -0400)
committerMatt Corallo <git@bluematt.me>
Sun, 19 Jul 2020 23:42:18 +0000 (19:42 -0400)
src/bgp_client.rs

index dc5c6736a923fdfdbc2487d0fc51e2718034a40e..d2b3443b06d723840436edcd2cc7b3446776a3a6 100644 (file)
@@ -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() {