From fa3d943ba90f168d3cc591c276b944f1eeda1344 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 3 Sep 2023 13:30:41 +0100 Subject: [PATCH] Don't set BBR for TCP peerings --- src/core/link_tcp_linux.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/core/link_tcp_linux.go b/src/core/link_tcp_linux.go index 9e875fee..6c54f30b 100644 --- a/src/core/link_tcp_linux.go +++ b/src/core/link_tcp_linux.go @@ -12,22 +12,6 @@ import ( // WARNING: This context is used both by net.Dialer and net.Listen in tcp.go func (t *linkTCP) tcpContext(network, address string, c syscall.RawConn) error { - var control error - var bbr error - - control = c.Control(func(fd uintptr) { - bbr = unix.SetsockoptString(int(fd), unix.IPPROTO_TCP, unix.TCP_CONGESTION, "bbr") - }) - - // Log any errors - if bbr != nil { - t.links.core.log.Debugln("Failed to set tcp_congestion_control to bbr for socket, SetsockoptString error:", bbr) - } - if control != nil { - t.links.core.log.Debugln("Failed to set tcp_congestion_control to bbr for socket, Control error:", control) - } - - // Return nil because errors here are not considered fatal for the connection, it just means congestion control is suboptimal return nil }