From 941ac9ceba7d7bafe30d1d8e7c7153acd43f8f77 Mon Sep 17 00:00:00 2001 From: Matthias Hannig Date: Thu, 22 Jun 2017 16:08:37 +0200 Subject: [PATCH] added per peer table filtered routes dump --- bird/bird.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bird/bird.go b/bird/bird.go index 8526050..bef67d2 100644 --- a/bird/bird.go +++ b/bird/bird.go @@ -270,14 +270,19 @@ func RoutesDumpPerPeerTable() (Parsed, bool) { filtered := []Parsed{} // Get protocols with filtered routes - protocols, _ := ProtocolsBgp() + protocolsRes, _ := ProtocolsBgp() + protocols := protocolsRes["protocols"].(Parsed) + for protocol, details := range protocols { details, ok := details.(Parsed) - counters, ok := details["routes"].(map[string]int) if !ok { continue } - filterCount := counters["filtered"] + counters, ok := details["routes"].(Parsed) + if !ok { + continue + } + filterCount := counters["filtered"].(int64) if filterCount == 0 { continue // nothing to do here. }