diff options
author | Mike Maloney <maloney@google.com> | 2017-04-18 17:14:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-20 21:39:19 +0200 |
commit | c1f8d0f98c3bc12393821c1bf00d8eaa0bd58bd8 (patch) | |
tree | 71f19fe662ccc3a778346ffd4c3b43c291ca0ac0 /Makefile | |
parent | mac80211: reject ToDS broadcast data frames (diff) | |
download | linux-c1f8d0f98c3bc12393821c1bf00d8eaa0bd58bd8.tar.xz linux-c1f8d0f98c3bc12393821c1bf00d8eaa0bd58bd8.zip |
selftests/net: Fixes psock_fanout CBPF test case
'psock_fanout' has been failing since commit 4d7b9dc1f36a9 ("tools:
psock_lib: harden socket filter used by psock tests"). That commit
changed the CBPF filter to examine the full ethernet frame, and was
tested on 'psock_tpacket' which uses SOCK_RAW. But 'psock_fanout' was
also using this same CBPF in two places, for filtering and fanout, on a
SOCK_DGRAM socket.
Change 'psock_fanout' to use SOCK_RAW so that the CBPF program used with
SO_ATTACH_FILTER can examine the entire frame. Create a new CBPF
program for use with PACKET_FANOUT_DATA which ignores the header, as it
cannot see the ethernet header.
Tested: Ran tools/testing/selftests/net/psock_{fanout,tpacket} 10 times,
and they all passed.
Fixes: 4d7b9dc1f36a9 ("tools: psock_lib: harden socket filter used by psock tests")
Signed-off-by: 'Mike Maloney <maloneykernel@gmail.com>'
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions