From 8ecef5c29a27aff668ce2f5160b890e91b0c9dc7 Mon Sep 17 00:00:00 2001 From: Louis DeLosSantos Date: Thu, 27 Jul 2023 13:01:16 -0400 Subject: [PATCH] bgpv1: do not supply empty control plane state This fixes an issue where an empty ControlPlaneState structure is provided to NewServerWithConfig within the RouterManager.registerBGPServer method. Instead, continue passing the ControlPlaneState supplied by the caller of registerBGPServer. Signed-off-by: Louis DeLosSantos --- pkg/bgpv1/manager/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/bgpv1/manager/manager.go b/pkg/bgpv1/manager/manager.go index 56ea77f829a84..dea8c3ef572a0 100644 --- a/pkg/bgpv1/manager/manager.go +++ b/pkg/bgpv1/manager/manager.go @@ -224,7 +224,7 @@ func (m *BGPRouterManager) registerBGPServer(ctx context.Context, c *v2alpha1api AdvertiseInactiveRoutes: true, }, }, - CState: &agent.ControlPlaneState{}, + CState: cstate, } if s, err = NewServerWithConfig(ctx, globalConfig); err != nil {