diff options
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go index 2ab17a4e..8140252c 100644 --- a/server/server.go +++ b/server/server.go @@ -1256,7 +1256,10 @@ func (s *BgpServer) GetVrf() (l []*table.Vrf) { s.mgmtCh <- func() { defer close(ch) - + if err := s.active(); err != nil { + log.Errorf("get vrf failed: %v", err) + return + } l = make([]*table.Vrf, 0, len(s.globalRib.Vrfs)) for _, vrf := range s.globalRib.Vrfs { l = append(l, vrf.Clone()) |