{Set,Get} SO_LINGER on all endpoints.

SO_LINGER is a socket level option and should be stored on all endpoints even
though it is used to linger only for TCP endpoints.

PiperOrigin-RevId: 332369252
This commit is contained in:
Nayana Bidari
2020-09-17 20:00:33 -07:00
committed by gVisor bot
parent c0b74be54c
commit d34bda0273
10 changed files with 151 additions and 23 deletions
+1 -1
View File
@@ -1185,7 +1185,7 @@ func getSockOptSocket(t *kernel.Task, s socket.SocketOps, ep commonEndpoint, fam
var v tcpip.LingerOption
var linger linux.Linger
if err := ep.GetSockOpt(&v); err != nil {
return &linger, nil
return nil, syserr.TranslateNetstackError(err)
}
if v.Enabled {