@@ -337,12 +337,12 @@ func bindRoutesToListeners(
337
337
bindL7RouteToListeners (r , gw , namespaces )
338
338
}
339
339
340
- l7routes := make ([]* L7Route , 0 , len (l7Routes ))
340
+ routes := make ([]* L7Route , 0 , len (l7Routes ))
341
341
for _ , r := range l7Routes {
342
- l7routes = append (l7routes , r )
342
+ routes = append (routes , r )
343
343
}
344
344
345
- isolateL7RouteListeners (l7routes , gw .Listeners )
345
+ isolateL7RouteListeners (routes , gw .Listeners )
346
346
347
347
l4routes := make ([]* L4Route , 0 , len (l4Routes ))
348
348
for _ , r := range l4Routes {
@@ -698,11 +698,6 @@ func tryToAttachL7RouteToListeners(
698
698
699
699
rk := CreateRouteKey (route .Source )
700
700
701
- listenerHostnameMap := make (map [string ]string , len (attachableListeners ))
702
- for _ , l := range attachableListeners {
703
- listenerHostnameMap [l .Name ] = getHostname (l .Source .Hostname )
704
- }
705
-
706
701
bind := func (l * Listener ) (allowed , attached bool ) {
707
702
if ! isRouteNamespaceAllowedByListener (l , route .Source .GetNamespace (), gw .Source .Namespace , namespaces ) {
708
703
return false , false
0 commit comments