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

Fix RoutesDumpPerPeerTable()

Fix RoutesDumpPerPeerTable to return results again and the filtered
routes.
This commit is contained in:
Patrick Seeburger 2018-09-28 14:10:04 +02:00 committed by Benedikt Rudolph
parent c1a07cc985
commit 541ea6d84d

View file

@ -299,10 +299,8 @@ func RoutesDumpPerPeerTable() (Parsed, bool) {
protocols := protocolsRes["protocols"].(Parsed)
for protocol, details := range protocols {
details, ok := details.(Parsed)
if !ok {
continue
}
details := details.(Parsed)
counters, ok := details["routes"].(Parsed)
if !ok {
continue
@ -312,7 +310,10 @@ func RoutesDumpPerPeerTable() (Parsed, bool) {
continue // nothing to do here.
}
// Lookup filtered routes
pfilteredRes, _ := RoutesFiltered(protocol)
pfilteredRes, from_cache := RoutesFiltered(protocol)
if reflect.DeepEqual(pfilteredRes, BirdError) {
return pfilteredRes, from_cache
}
pfiltered, ok := pfilteredRes["routes"].([]Parsed)
if !ok {