summaryrefslogtreecommitdiffstats
path: root/samples/bpf/xsk_fwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/bpf/xsk_fwd.c')
-rw-r--r--samples/bpf/xsk_fwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/bpf/xsk_fwd.c b/samples/bpf/xsk_fwd.c
index 52e7c4ffd228..2220509588a0 100644
--- a/samples/bpf/xsk_fwd.c
+++ b/samples/bpf/xsk_fwd.c
@@ -974,8 +974,8 @@ static void remove_xdp_program(void)
int i;
for (i = 0 ; i < n_ports; i++)
- bpf_set_link_xdp_fd(if_nametoindex(port_params[i].iface), -1,
- port_params[i].xsk_cfg.xdp_flags);
+ bpf_xdp_detach(if_nametoindex(port_params[i].iface),
+ port_params[i].xsk_cfg.xdp_flags, NULL);
}
int main(int argc, char **argv)