]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: psock_tpacket: fix status check
authorDaniel Borkmann <dborkman@redhat.com>
Wed, 24 Apr 2013 23:08:00 +0000 (23:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Apr 2013 16:26:53 +0000 (12:26 -0400)
commit76f26605dfb53bc148c7ebbde54ac581a241f78d
treee27205f97443fed29f28cb16b63e4204afe2f1d5
parentd9036d3e57b87770dd31d6c6fc0c403b6c93acd0
selftests: psock_tpacket: fix status check

Testing like this for TP_STATUS_AVAILABLE clearly is a stupid bug
since it always returns true. Fix this by only checking for flags
where the kernel owns the packet and negate this result, since we
also could run into the non-zero status TP_STATUS_WRONG_FORMAT
and need to reclaim frames.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/psock_tpacket.c