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:
parent
c1a07cc985
commit
541ea6d84d
1 changed files with 6 additions and 5 deletions
11
bird/bird.go
11
bird/bird.go
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue