summaryrefslogtreecommitdiffhomepage
path: root/config/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'config/util.go')
-rw-r--r--config/util.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/config/util.go b/config/util.go
index ab7ebfe3..de7ba3d4 100644
--- a/config/util.go
+++ b/config/util.go
@@ -59,12 +59,8 @@ type AfiSafis []AfiSafi
func (c AfiSafis) ToRfList() ([]bgp.RouteFamily, error) {
rfs := make([]bgp.RouteFamily, 0, len(c))
- for _, rf := range c {
- k, err := bgp.GetRouteFamily(string(rf.Config.AfiSafiName))
- if err != nil {
- return nil, fmt.Errorf("invalid address family: %s", rf.Config.AfiSafiName)
- }
- rfs = append(rfs, k)
+ for _, af := range c {
+ rfs = append(rfs, af.State.Family)
}
return rfs, nil
}