1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00

added per peer table filtered routes dump

This commit is contained in:
Matthias Hannig 2017-06-22 16:08:37 +02:00
parent b96a864b04
commit 941ac9ceba

View file

@ -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.
}