diff --git a/pkg/agent/server/guest.go b/pkg/agent/server/guest.go index b7cfbd64a..11be19d53 100644 --- a/pkg/agent/server/guest.go +++ b/pkg/agent/server/guest.go @@ -174,7 +174,9 @@ func (g *Guest) updateClassicFlows(ctx context.Context) (err error) { bfs, err := g.FlowsMap() for bridge, flows := range bfs { flowman := g.watcher.agent.GetFlowMan(bridge) - flowman.updateFlows(ctx, g.Who(), flows) + if flowman != nil { + flowman.updateFlows(ctx, g.Who(), flows) + } } return } @@ -187,7 +189,9 @@ func (g *Guest) clearClassicFlows(ctx context.Context) { } for bridge, _ := range bridges { flowman := g.watcher.agent.GetFlowMan(bridge) - flowman.updateFlows(ctx, g.Who(), []*ovs.Flow{}) + if flowman != nil { + flowman.updateFlows(ctx, g.Who(), []*ovs.Flow{}) + } } g.clearPending() } diff --git a/pkg/agent/server/tap.go b/pkg/agent/server/tap.go index c8ec7a807..5f29bb748 100644 --- a/pkg/agent/server/tap.go +++ b/pkg/agent/server/tap.go @@ -189,7 +189,9 @@ func (man *tapMan) syncTapConfig(ctx context.Context) error { } // sync brtap flows flowman := man.agent.GetFlowMan(man.tapBridge()) - flowman.updateFlows(ctx, "tapman", tapFlows) + if flowman != nil { + flowman.updateFlows(ctx, "tapman", tapFlows) + } mirrorMap, err := fetchMirrorList(ctx) if err != nil {