Bug#72 reading zero bytes in linux BIP. Thanks, Mikhail! (#132)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -516,6 +516,10 @@ static int readNlSock(
|
|||||||
perror("SOCK READ: ");
|
perror("SOCK READ: ");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if (readLen == 0) {
|
||||||
|
/* no data in the response */
|
||||||
|
break;
|
||||||
|
}
|
||||||
nlHdr = (struct nlmsghdr *)bufPtr;
|
nlHdr = (struct nlmsghdr *)bufPtr;
|
||||||
/* Check if the header is valid */
|
/* Check if the header is valid */
|
||||||
if ((0 == NLMSG_OK(nlHdr, readLen)) ||
|
if ((0 == NLMSG_OK(nlHdr, readLen)) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user