Skip to content

Commit e457fc9

Browse files
committed
fix comments
1 parent a452d75 commit e457fc9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/controller/state/graph/route_common.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,17 +308,19 @@ func buildSectionNameRefs(
308308
}
309309

310310
// If there is no section name, handle based on whether port is specified
311+
// FIXME(sarthyparty): this logic seems to be duplicated in findAttachableListeners so we should refactor this,
312+
// either here or in findAttachableListeners
311313
if p.SectionName == nil {
312314
// If port is specified, preserve the port-only nature for proper validation
313315
if p.Port != nil {
314316
sectionNameRefs = append(sectionNameRefs, ParentRef{
315317
Idx: i,
316318
Gateway: CreateParentRefGateway(gw),
317319
SectionName: nil, // Keep as nil to preserve port-only semantics
318-
Port: p.Port,
320+
Port: nil,
319321
})
320322
} else {
321-
// If no port and no sectionName, expand to all listeners (existing behavior)
323+
// If no port and no sectionName, expand to all listeners
322324
for _, l := range gw.Listeners {
323325
k.sectionName = string(l.Source.Name)
324326

0 commit comments

Comments
 (0)