Loading...
Note: File does not exist in v6.8.
1// SPDX-License-Identifier: GPL-2.0
2
3#include "vmlinux.h"
4#include <bpf/bpf_helpers.h>
5#include "bpf_misc.h"
6
7SEC("tc/ingress")
8__description("uninit/mtu: write rejected")
9__success
10__caps_unpriv(CAP_BPF|CAP_NET_ADMIN)
11__failure_unpriv __msg_unpriv("invalid indirect read from stack")
12int tc_uninit_mtu(struct __sk_buff *ctx)
13{
14 __u32 mtu;
15
16 bpf_check_mtu(ctx, 0, &mtu, 0, 0);
17 return TCX_PASS;
18}
19
20char LICENSE[] SEC("license") = "GPL";