1 // SPDX-License-Identifier: GPL-2.0 1 // SPDX-License-Identifier: GPL-2.0 2 2 3 #include "vmlinux.h" 3 #include "vmlinux.h" 4 #include <bpf/bpf_helpers.h> 4 #include <bpf/bpf_helpers.h> 5 #include "bpf_misc.h" 5 #include "bpf_misc.h" 6 6 7 SEC("tc/ingress") 7 SEC("tc/ingress") 8 __description("uninit/mtu: write rejected") 8 __description("uninit/mtu: write rejected") 9 __failure __msg("invalid indirect read from st 9 __failure __msg("invalid indirect read from stack") 10 int tc_uninit_mtu(struct __sk_buff *ctx) 10 int tc_uninit_mtu(struct __sk_buff *ctx) 11 { 11 { 12 __u32 mtu; 12 __u32 mtu; 13 13 14 bpf_check_mtu(ctx, 0, &mtu, 0, 0); 14 bpf_check_mtu(ctx, 0, &mtu, 0, 0); 15 return TCX_PASS; 15 return TCX_PASS; 16 } 16 } 17 17 18 char LICENSE[] SEC("license") = "GPL"; 18 char LICENSE[] SEC("license") = "GPL"; 19 19
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.