netlink: drop workaround for libnl3 bug in nl_recv()

This commit is contained in:
Thomas Haller
2018-02-16 15:20:56 +01:00
parent 3fab322a20
commit f3a0f60e9a

View File

@@ -6481,23 +6481,7 @@ continue_reading:
errno = 0;
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) {
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: {
int buf_size;