From 57f9c962892481512eb472bdfcdf3d967b6da157 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 22 Aug 2019 23:39:20 -0400 Subject: [PATCH] Reset routing tables on reconnect --- src/bgp_client.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bgp_client.rs b/src/bgp_client.rs index a890dad..a96de04 100644 --- a/src/bgp_client.rs +++ b/src/bgp_client.rs @@ -257,7 +257,9 @@ impl BGPClient { } match bgp_msg { Message::Open(_) => { - printer.add_line("Connected to BGP route provider".to_string(), true); + client.routes.lock().unwrap().v4_table.clear(); + client.routes.lock().unwrap().v6_table.clear(); + printer.add_line("Connected to BGP route provider".to_string(), false); }, Message::KeepAlive => { let _ = sender.try_send(Message::KeepAlive); -- 2.39.5