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
1 changed files with 4 additions and 1 deletions

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;