netlink: drop workaround for libnl3 bug in nl_recv()
This commit is contained in:
@@ -6481,23 +6481,7 @@ continue_reading:
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
n = nl_recv (sk, &nla, &buf, &creds);
|
n = nl_recv (sk, &nla, &buf, &creds);
|
||||||
|
|
||||||
if (n <= 0) {
|
|
||||||
/* workaround libnl3 <= 3.2.15 returning danling pointers in case nl_recv()
|
|
||||||
* fails. Fixed by libnl3 69468517d0de1675d80f24661ff57a5dbac7275c. */
|
|
||||||
buf = NULL;
|
|
||||||
creds = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 0:
|
|
||||||
/* Work around a libnl bug fixed in 3.2.22 (375a6294) */
|
|
||||||
if (errno == EAGAIN) {
|
|
||||||
/* EAGAIN is equal to EWOULDBLOCK. If it would not be, we'd have to
|
|
||||||
* workaround libnl3 mapping EWOULDBLOCK to -NLE_FAILURE. */
|
|
||||||
G_STATIC_ASSERT (EAGAIN == EWOULDBLOCK);
|
|
||||||
n = -NLE_AGAIN;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case -NLE_MSG_TRUNC: {
|
case -NLE_MSG_TRUNC: {
|
||||||
int buf_size;
|
int buf_size;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user