@@ -1384,7 +1384,7 @@ func buildHTTPListener(t, s interface{}) string {
13841384 addrV4 = tc .Cfg .BindAddressIpv4
13851385 }
13861386
1387- co := commonListenOptions (& tc , hostname )
1387+ co := commonListenOptions (& tc , hostname , true )
13881388
13891389 out = append (out , httpListener (addrV4 , co , & tc )... )
13901390
@@ -1417,14 +1417,18 @@ func buildHTTPSListener(t, s interface{}) string {
14171417 return ""
14181418 }
14191419
1420- co := commonListenOptions (& tc , hostname )
1420+ httpsCo := commonListenOptions (& tc , hostname , true )
1421+ quicCo := commonListenOptions (& tc , hostname , false )
14211422
14221423 addrV4 := []string {"" }
14231424 if len (tc .Cfg .BindAddressIpv4 ) > 0 {
14241425 addrV4 = tc .Cfg .BindAddressIpv4
14251426 }
14261427
1427- out = append (out , httpsListener (addrV4 , co , & tc )... )
1428+ out = append (out , httpsListener (addrV4 , httpsCo , & tc )... )
1429+ if tc .IsQUICEnabled {
1430+ out = append (out , quicListener (addrV4 , quicCo , & tc )... )
1431+ }
14281432
14291433 if ! tc .IsIPV6Enabled {
14301434 return strings .Join (out , "\n " )
@@ -1435,12 +1439,15 @@ func buildHTTPSListener(t, s interface{}) string {
14351439 addrV6 = tc .Cfg .BindAddressIpv6
14361440 }
14371441
1438- out = append (out , httpsListener (addrV6 , co , & tc )... )
1442+ out = append (out , httpsListener (addrV6 , httpsCo , & tc )... )
1443+ if tc .IsQUICEnabled {
1444+ out = append (out , quicListener (addrV6 , quicCo , & tc )... )
1445+ }
14391446
14401447 return strings .Join (out , "\n " )
14411448}
14421449
1443- func commonListenOptions (template * config.TemplateConfig , hostname string ) string {
1450+ func commonListenOptions (template * config.TemplateConfig , hostname string , withBacklog bool ) string {
14441451 var out []string
14451452
14461453 if template .Cfg .UseProxyProtocol {
@@ -1459,7 +1466,9 @@ func commonListenOptions(template *config.TemplateConfig, hostname string) strin
14591466 out = append (out , "reuseport" )
14601467 }
14611468
1462- out = append (out , fmt .Sprintf ("backlog=%v" , template .BacklogSize ))
1469+ if withBacklog {
1470+ out = append (out , fmt .Sprintf ("backlog=%v" , template .BacklogSize ))
1471+ }
14631472
14641473 return strings .Join (out , " " )
14651474}
@@ -1509,13 +1518,12 @@ func httpsListener(addresses []string, co string, tc *config.TemplateConfig) []s
15091518
15101519 out = append (out , strings .Join (lo , " " ))
15111520 }
1512- if ! tc .IsQUICEnabled {
1513- return out
1514- }
1515- if strings .Contains (co , "backlog=" ) {
1516- klog .V (3 ).InfoS ("Skipping HTTP/3 because of incompatible backlog parameter" )
1517- return out
1518- }
1521+
1522+ return out
1523+ }
1524+
1525+ func quicListener (addresses []string , co string , tc * config.TemplateConfig ) []string {
1526+ out := make ([]string , 0 )
15191527 for _ , address := range addresses {
15201528 lo := []string {"listen" }
15211529
0 commit comments