Skip to content

Commit 32a7cec

Browse files
salonichf5sjberman
andauthored
Update internal/mode/static/state/graph/route_common.go
Co-authored-by: Saylor Berman <[email protected]>
1 parent 45651cb commit 32a7cec

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

internal/mode/static/state/graph/route_common.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -421,15 +421,11 @@ func isolateHostnamesForParentRefs(parentRef []ParentRef, listenerHostnameMap ma
421421
// for L4Routes, we only compare the hostname and listener name combination
422422
// because we do not allow l4Routes to attach to the same listener
423423
// if they share the same port and hostname.
424-
if isL4Route {
425424
if h == lHostPort.hostname && listenerName != lName {
426-
hostnamesToRemoves[h] = struct{}{}
425+
if l4Route || lHostPort.port == ref.Attachment.ListenerPort {
426+
hostnamesToRemoves[h] = struct{}{}
427+
}
427428
}
428-
} else {
429-
if h == lHostPort.hostname && listenerName != lName && lHostPort.port == ref.Attachment.ListenerPort {
430-
hostnamesToRemoves[h] = struct{}{}
431-
}
432-
}
433429
}
434430
}
435431

0 commit comments

Comments
 (0)