Merge pull request #7947 from tanyifeng:tcpinfo

PiperOrigin-RevId: 474377325
This commit is contained in:
gVisor bot
2022-09-14 13:38:13 -07:00
+4
View File
@@ -410,6 +410,10 @@ func (s *socketOpsCommon) GetSockOpt(t *kernel.Task, level int, name int, optVal
optlen = sizeofInt32
case linux.TCP_INFO:
optlen = linux.SizeOfTCPInfo
// Truncate the output buffer to outLen size.
if optlen > outLen {
optlen = outLen
}
case linux.TCP_CONGESTION:
optlen = outLen
}