Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 22 lines 424 B view raw
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("lwt_xmit") 8__success __retval(0) 9int test_missing_dst(struct __sk_buff *skb) 10{ 11 struct iphdr iph; 12 13 __builtin_memset(&iph, 0, sizeof(struct iphdr)); 14 iph.ihl = 5; 15 iph.version = 4; 16 17 bpf_lwt_push_encap(skb, BPF_LWT_ENCAP_IP, &iph, sizeof(struct iphdr)); 18 19 return 0; 20} 21 22char _license[] SEC("license") = "GPL";