server: fix GetRib() to handle error properly

fix a bug that GetRib() doesn't return an error even if an error
happens.
This commit is contained in:
hepeng
2017-04-01 16:08:52 +09:00
committed by FUJITA Tomonori
parent 4284355568
commit 1d3225bd29
+1 -1
View File
@@ -1431,7 +1431,7 @@ func (s *BgpServer) GetRib(addr string, family bgp.RouteFamily, prefixes []*tabl
return fmt.Errorf("address family: %s not supported", af)
}
rib, err = tbl.Select(table.TableSelectOption{ID: id, LookupPrefixes: prefixes})
return nil
return err
}, true)
return
}