Browse Source
Fix: call `SetSendBufferSize` when setting send buffer size option (#336)
pull/340/head
Nicolai Moore
9 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
core/tcp.go
|
@ -101,7 +101,7 @@ func setSocketOptions(s *stack.Stack, ep tcpip.Endpoint) tcpip.Error { |
|
|
{ /* TCP recv/send buffer size */ |
|
|
{ /* TCP recv/send buffer size */ |
|
|
var ss tcpip.TCPSendBufferSizeRangeOption |
|
|
var ss tcpip.TCPSendBufferSizeRangeOption |
|
|
if err := s.TransportProtocolOption(header.TCPProtocolNumber, &ss); err == nil { |
|
|
if err := s.TransportProtocolOption(header.TCPProtocolNumber, &ss); err == nil { |
|
|
ep.SocketOptions().SetReceiveBufferSize(int64(ss.Default), false) |
|
|
ep.SocketOptions().SetSendBufferSize(int64(ss.Default), false) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var rs tcpip.TCPReceiveBufferSizeRangeOption |
|
|
var rs tcpip.TCPReceiveBufferSizeRangeOption |
|
|