From 8418465c2884d6e32c257ccda4042a02081bc5de Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Thu, 9 May 2024 11:16:08 +0900 Subject: [PATCH] Added LB annotations to skip adding local VIP --- pkg/loxinet/rules.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/loxinet/rules.go b/pkg/loxinet/rules.go index 14c232a8d..7c4d9611a 100644 --- a/pkg/loxinet/rules.go +++ b/pkg/loxinet/rules.go @@ -1189,7 +1189,7 @@ func (R *RuleH) unFoldRecursiveEPs(r *ruleEnt) { // addVIPSys - system specific operations for VIPs of a LB rule func (R *RuleH) addVIPSys(r *ruleEnt) { - if !strings.Contains(r.name, "ipvs") { + if !strings.Contains(r.name, "ipvs") && !strings.Contains(r.name, "static") { R.vipMap[r.tuples.l3Dst.addr.IP.String()]++ if R.vipMap[r.tuples.l3Dst.addr.IP.String()] == 1 { @@ -1498,7 +1498,7 @@ func (R *RuleH) AddNatLbRule(serv cmn.LbServiceArg, servSecIPs []cmn.LbSecIPArg, // deleteVIPSys - system specific operations for deleting VIPs of a LB rule func (R *RuleH) deleteVIPSys(r *ruleEnt) { - if !strings.Contains(r.name, "ipvs") { + if !strings.Contains(r.name, "ipvs") && !strings.Contains(r.name, "static") { R.vipMap[r.tuples.l3Dst.addr.IP.String()]-- if R.vipMap[r.tuples.l3Dst.addr.IP.String()] == 0 {