Fix SO_ACCEPTCONN option for unix sockets.

SO_ACCEPTCONN returns true for TCP sockets which are in a listening state.
Added this socket option support for unix sockets.

PiperOrigin-RevId: 577008617
This commit is contained in:
Nayana Bidari
2023-10-26 15:48:38 -07:00
committed by gVisor bot
parent b445e3ca8e
commit aa02c6fa15
5 changed files with 45 additions and 7 deletions
@@ -645,3 +645,7 @@ func (e *connectionedEndpoint) EventUnregister(we *waiter.Entry) {
fdnotifier.UpdateFD(bsFD.NotificationFD())
}
}
func (e *connectionedEndpoint) GetAcceptConn() bool {
return e.Listening()
}