Skip to content

Commit fb13cc0

Browse files
committed
Revert "Coverage: removed unused code"
This reverts commit 1463520.
1 parent fc05ec4 commit fb13cc0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

go/pkg/pass1/normalize-services.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,14 @@ func (c *spoc) checkCombined46(v4, v6 groupObjList, s *service) {
174174
if s.ipV4Only || s.ipV6Only {
175175
return
176176
}
177+
isOtherAggInCluster := func(ob groupObj) bool {
178+
if agg, ok := ob.(*network); ok && agg.isAggregate {
179+
if z := agg.zone; z != z.cluster[0] {
180+
return true
181+
}
182+
}
183+
return false
184+
}
177185
m := make(map[string]bool)
178186
for _, ob := range v6 {
179187
if ob.isCombined46() {
@@ -202,7 +210,7 @@ func (c *spoc) checkCombined46(v4, v6 groupObjList, s *service) {
202210
}
203211

204212
for _, ob := range v4 {
205-
if ob.isCombined46() {
213+
if ob.isCombined46() && !isOtherAggInCluster(ob) {
206214
if m[ob.String()] {
207215
delete(m, ob.String())
208216
} else if !checkSup(v4, v6, ob.String()) {

0 commit comments

Comments
 (0)