Skip to content

Commit

Permalink
Update pkg/vpcmodel/grouping.go
Browse files Browse the repository at this point in the history
Co-authored-by: Adi Sosnovich <[email protected]>
  • Loading branch information
ShiriMoran and adisos authored Nov 1, 2023
1 parent f88cffa commit f2d2384
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/vpcmodel/grouping.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,12 @@ func (g *GroupConnLines) groupInternalSrcOrDst(srcGrouping, groupVsi bool) {
// and align all src, dst to use the same reference via g.groupedEndpointsElemsMap
// this is done here since *GroupConnLines is not known within the extendGroupingSelfLoops context
func (g *GroupConnLines) unifiedGroupedConnLines(oldConnLines []*GroupedConnLine) []*GroupedConnLine {
newGroupedLines := []*GroupedConnLine{}
newGroupedLines := make([]*GroupedConnLine, len(oldConnLines))
// go over all connections; if src/dst is not external then use groupedEndpointsElemsMap
for _, groupedConnLine := range oldConnLines {
newGroupedConnLine := &GroupedConnLine{g.unifiedGroupedElems(groupedConnLine.Src),
for i, groupedConnLine := range oldConnLines {
newGroupedLines[i] = &GroupedConnLine{g.unifiedGroupedElems(groupedConnLine.Src),
g.unifiedGroupedElems(groupedConnLine.Dst),
groupedConnLine.Conn}
newGroupedLines = append(newGroupedLines, newGroupedConnLine)
}
return newGroupedLines
}
Expand Down

0 comments on commit f2d2384

Please sign in to comment.