#include #include #include #include #include #include "bpf_helpers.h" SEC("cgroup/sock1") int bpf_prog1(struct bpf_sock *sk) { char fmt[] = "socket: family %d type %d protocol %d\n"; bpf_trace_printk(fmt, sizeof(fmt), sk->family, sk->type, sk->protocol); /* block PF_INET6, SOCK_RAW, IPPROTO_ICMPV6 sockets * ie., make ping6 fail */ if (sk->family == PF_INET6 && sk->type == SOCK_RAW && sk->protocol == IPPROTO_ICMPV6) return 0; return 1; } SEC("cgroup/sock2") int bpf_prog2(struct bpf_sock *sk) { char fmt[] = "socket: family %d type %d protocol %d\n"; bpf_trace_printk(fmt, sizeof(fmt), sk->family, sk->type, sk->protocol); /* block PF_INET, SOCK_RAW, IPPROTO_ICMP sockets * ie., make ping fail */ if (sk->family == PF_INET && sk->type == SOCK_RAW && sk->protocol == IPPROTO_ICMP) return 0; return 1; } char _license[] SEC("license") = "GPL"; thod='get'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-03 22:19:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-03 22:19:15 +0100
commit424414947da3dd5cb0d60e4f299f7c51e472ae77 (patch)
treea4067480c4256c80ae8f8438a3e4bb88e32050bc /tools/perf/arch/arm64
parenta3683e0c1410c5c8136a7a93b0336ce88d3b893a (diff)
parentd07830db1bdb254e4b50d366010b219286b8c937 (diff)
Merge tag 'usb-serial-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes: USB-serial fixes for v4.10-rc7 One more device ID for pl2303. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'tools/perf/arch/arm64')