johannes-engler-mw commented on code in PR #2703:
URL:
https://github.com/apache/apisix-ingress-controller/pull/2703#discussion_r2919719190
##########
internal/controller/utils.go:
##########
@@ -362,6 +362,10 @@ func ParseRouteParentRefs(
reason := gatewayv1.RouteReasonNoMatchingParent
var listenerName string
var matchedListener gatewayv1.Listener
+ var matchedListeners []gatewayv1.Listener
+
+ // Track if sectionName was explicitly specified
+ sectionNameSpecified := parentRef.SectionName != nil &&
*parentRef.SectionName != ""
for _, listener := range gateway.Spec.Listeners {
if parentRef.SectionName != nil {
Review Comment:
> I checked this path again and an empty sectionName does not constrain
listener matching in the current code.
> In ParseRouteParentRefs, we only skip a listener when
*parentRef.SectionName != "" && *parentRef.SectionName != listener.Name. If
sectionName is present but empty, that condition is false, so the loop still
evaluates all
> compatible listeners.
> sectionNameSpecified is only used to control the explicit-target
behavior (listenerName assignment and early break), not to decide whether
matching happens at all. So this does not currently cause a route to fail
matching
> listeners.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]