From bfc03b936d82c2cde4f57921a9310993983c0202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A5=96=E5=BB=BA?= Date: Thu, 25 Apr 2024 15:26:51 +0800 Subject: [PATCH] fix nil pointer dereference (#3951) Signed-off-by: zhangzujian --- .trivyignore | 1 + pkg/controller/vpc.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.trivyignore b/.trivyignore index e69de29bb2d..5fd0a943e92 100644 --- a/.trivyignore +++ b/.trivyignore @@ -0,0 +1 @@ +CVE-2020-8559 diff --git a/pkg/controller/vpc.go b/pkg/controller/vpc.go index bfa6ddd0710..e1d67e4973a 100644 --- a/pkg/controller/vpc.go +++ b/pkg/controller/vpc.go @@ -378,6 +378,8 @@ func (c *Controller) handleAddOrUpdateVpc(key string) error { klog.Error("failed to get node switch subnet %s: %v", c.config.NodeSwitch) return err } + c.addOrUpdateVpcQueue.Add(vpc.Name) + return nil } gatewayV4, gatewayV6 := util.SplitStringIP(joinSubnet.Spec.Gateway) if gatewayV4 != "" {