Skip to content

Commit 7f0e72b

Browse files
zirainjukie
andcommitted
Update internal/gatewayapi/listener.go
Co-authored-by: Isaac Wilson <isaac.wilson514@gmail.com> Signed-off-by: zirain <zirain2009@gmail.com>
1 parent 9285c53 commit 7f0e72b

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

internal/gatewayapi/listener.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,7 @@ func (t *Translator) validateListenerSpec(listener *ListenerContext, resources *
263263
specValid := t.validateAllowedNamespaces(listener)
264264

265265
// Phase 2: Validate allowed routes based on protocol
266-
if listener.Protocol == gwapiv1.HTTPProtocolType ||
267-
listener.Protocol == gwapiv1.HTTPSProtocolType ||
268-
listener.Protocol == gwapiv1.TCPProtocolType ||
269-
listener.Protocol == gwapiv1.UDPProtocolType ||
270-
listener.Protocol == gwapiv1.TLSProtocolType {
266+
if isSupportedListenerProtocol(listener.Protocol) {
271267
var tlsMode *gwapiv1.TLSModeType
272268
if listener.TLS != nil {
273269
tlsMode = listener.TLS.Mode

0 commit comments

Comments
 (0)