mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 17:11:33 +00:00
selftests/bpf: Fix kfree_skb on s390x
h_proto is big-endian; use htons() in order to make comparison work on both little- and big-endian machines. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Link: https://lore.kernel.org/r/20230128000650.1516334-7-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
6eab2370d1
commit
31da9be64a
@ -36,7 +36,7 @@ static void on_sample(void *ctx, int cpu, void *data, __u32 size)
|
||||
"cb32_0 %x != %x\n",
|
||||
meta->cb32_0, cb.cb32[0]))
|
||||
return;
|
||||
if (CHECK(pkt_v6->eth.h_proto != 0xdd86, "check_eth",
|
||||
if (CHECK(pkt_v6->eth.h_proto != htons(ETH_P_IPV6), "check_eth",
|
||||
"h_proto %x\n", pkt_v6->eth.h_proto))
|
||||
return;
|
||||
if (CHECK(pkt_v6->iph.nexthdr != 6, "check_ip",
|
||||
|
Loading…
Reference in New Issue
Block a user