summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMike Maloney <maloney@google.com>2017-04-18 11:14:16 -0400
committerDavid S. Miller <davem@davemloft.net>2017-04-20 15:39:19 -0400
commitc1f8d0f98c3bc12393821c1bf00d8eaa0bd58bd8 (patch)
tree71f19fe662ccc3a778346ffd4c3b43c291ca0ac0 /net
parent3018e947d7fd536d57e2b550c33e456d921fff8c (diff)
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 'net')
0 files changed, 0 insertions, 0 deletions