036a05f50b
Add a check to the xdp_link selftest that the kernel rejects replacing an XDP program with a different program type on link update. v2: - Split this out into its own patch. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://lore.kernel.org/r/20220107221115.326171-3-toke@redhat.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
19 lines
289 B
C
19 lines
289 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/* Copyright (c) 2020 Facebook */
|
|
#include <linux/bpf.h>
|
|
#include <bpf/bpf_helpers.h>
|
|
|
|
char LICENSE[] SEC("license") = "GPL";
|
|
|
|
SEC("xdp")
|
|
int xdp_handler(struct xdp_md *xdp)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
SEC("tc")
|
|
int tc_handler(struct __sk_buff *skb)
|
|
{
|
|
return 0;
|
|
}
|