summaryrefslogtreecommitdiffhomepage
path: root/api/grpc_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/grpc_server.go')
-rw-r--r--api/grpc_server.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/grpc_server.go b/api/grpc_server.go
index d1b82aeb..161bc826 100644
--- a/api/grpc_server.go
+++ b/api/grpc_server.go
@@ -100,7 +100,7 @@ func NewMpGracefulRestartFromConfigStruct(c *config.MpGracefulRestart) *MpGracef
func NewAfiSafiConfigFromConfigStruct(c *config.AfiSafi) *AfiSafiConfig {
return &AfiSafiConfig{
- Family: uint32(c.State.Family),
+ Family: extractFamilyFromConfigAfiSafi(c),
Enabled: c.Config.Enabled,
}
}
@@ -223,7 +223,7 @@ func NewPeerFromConfigStruct(pconf *config.Neighbor) *Peer {
prefixLimits := make([]*PrefixLimit, 0, len(pconf.AfiSafis))
afiSafis := make([]*AfiSafi, 0, len(pconf.AfiSafis))
for _, f := range pconf.AfiSafis {
- families = append(families, uint32(f.State.Family))
+ families = append(families, extractFamilyFromConfigAfiSafi(&f))
if prefixLimit := NewPrefixLimitFromConfigStruct(&f); prefixLimit != nil {
prefixLimits = append(prefixLimits, prefixLimit)
}