From e56a6367d7ac7178660fd342b30c5d4ac452441b 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 69cd30863e5..3edf4c21afc 100644 --- a/pkg/controller/vpc.go +++ b/pkg/controller/vpc.go @@ -343,6 +343,8 @@ func (c *Controller) handleAddOrUpdateVpc(key string) error { klog.Errorf("failed to get node switch subnet %s: %v", c.config.NodeSwitch, err) return err } + c.addOrUpdateVpcQueue.Add(vpc.Name) + return nil } gatewayV4, gatewayV6 := util.SplitStringIP(joinSubnet.Spec.Gateway) if gatewayV4 != "" {