mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue