mirror of https://github.com/aya-rs/aya
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
287 B
C
18 lines
287 B
C
4 months ago
|
// clang-format off
|
||
|
#include <vmlinux.h>
|
||
|
#include <bpf/bpf_helpers.h>
|
||
|
// clang-format on
|
||
|
|
||
|
extern unsigned int CONFIG_BPF __kconfig;
|
||
|
|
||
|
SEC("xdp")
|
||
|
int kconfig(struct xdp_md *ctx) {
|
||
|
if (!CONFIG_BPF) {
|
||
|
return XDP_DROP;
|
||
|
}
|
||
|
|
||
|
return XDP_PASS;
|
||
|
}
|
||
|
|
||
|
char _license[] SEC("license") = "GPL";
|