3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 10:29:03 +02:00

monitor: Fix check for netlink hardware and protocol type

This commit is contained in:
Marcel Holtmann 2014-08-10 17:33:48 -07:00
parent 4a5f30bbc2
commit 9fbd454c88

View File

@ -1553,7 +1553,10 @@ static bool nlmon_receive(struct l_io *io, void *user_data)
return true;
}
if (ntohs(sll.sll_protocol) != NETLINK_GENERIC)
if (sll.sll_protocol != htons(NETLINK_GENERIC))
return true;
if (sll.sll_hatype != ARPHRD_NETLINK)
return true;
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg;