mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
core/link_tcp_linux: drop trying to set BBR
Instead of implementing an ability to select arbitrary TCP congestion control algorithm (#776), drop setting it altogether as suggested by @link2xt in #754. Link: https://github.com/yggdrasil-network/yggdrasil-go/pull/776 Fixes: https://github.com/yggdrasil-network/yggdrasil-go/issues/754 Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>
This commit is contained in:
parent
2eda59d9e4
commit
0f340f1ec5
1 changed files with 0 additions and 16 deletions
|
@ -12,22 +12,6 @@ import (
|
||||||
// WARNING: This context is used both by net.Dialer and net.Listen in tcp.go
|
// 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 {
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue