Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215
am: dfcc7dbad0
am: 602a2ce0e0
am: 189527f13f
Change-Id: Ie4cdfd04c1acf48c802b233eb34b2417c859ae04
This commit is contained in:
commit
60fb60616c
1 changed files with 5 additions and 2 deletions
|
@ -64,8 +64,11 @@ int NetlinkManager::start() {
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) {
|
||||
SLOGE("Unable to set uevent socket SO_RCVBUFFORCE option: %s", strerror(errno));
|
||||
// When running in a net/user namespace, SO_RCVBUFFORCE is not available.
|
||||
// Try using SO_RCVBUF first.
|
||||
if ((setsockopt(mSock, SOL_SOCKET, SO_RCVBUF, &sz, sizeof(sz)) < 0) &&
|
||||
(setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0)) {
|
||||
SLOGE("Unable to set uevent socket SO_RCVBUF/SO_RCVBUFFORCE option: %s", strerror(errno));
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue