summaryrefslogtreecommitdiffstats
path: root/samples/bpf/xdpsock_ctrl_proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/bpf/xdpsock_ctrl_proc.c')
-rw-r--r--samples/bpf/xdpsock_ctrl_proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/xdpsock_ctrl_proc.c b/samples/bpf/xdpsock_ctrl_proc.c
index cc4408797ab7..28b5f2a9fa08 100644
--- a/samples/bpf/xdpsock_ctrl_proc.c
+++ b/samples/bpf/xdpsock_ctrl_proc.c
@@ -173,7 +173,7 @@ main(int argc, char **argv)
unlink(SOCKET_NAME);
/* Unset fd for given ifindex */
- err = bpf_set_link_xdp_fd(ifindex, -1, 0);
+ err = bpf_xdp_detach(ifindex, 0, NULL);
if (err) {
fprintf(stderr, "Error when unsetting bpf prog_fd for ifindex(%d)\n", ifindex);
return err;