mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
Minimal example to show that the close() operation on a bpf_link can hang indefinitely if the kernel is loaded (for example by traffic on an interface with an XDP program loaded). Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
14 lines
240 B
C
14 lines
240 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#include <linux/bpf.h>
|
|
#include <bpf/bpf_helpers.h>
|
|
#include <bpf/bpf_endian.h>
|
|
|
|
SEC("xdp/pass")
|
|
int xdp_pass(struct xdp_md *ctx)
|
|
{
|
|
return XDP_PASS;
|
|
}
|
|
|
|
char _license[] SEC("license") = "GPL";
|