diff --git a/xdp-server.c b/xdp-server.c index 3433ef9b..9274723e 100644 --- a/xdp-server.c +++ b/xdp-server.c @@ -230,8 +230,11 @@ static int load_xdp_program_and_map(struct xdp_server *xdp) { } if (xdp->bpf_prog_should_load) { - /* err = xdp_program__attach(xdp->bpf_prog, xdp->interface_index, attach_mode, 0); */ - err = xdp_program__attach_single(xdp->bpf_prog, xdp->interface_index, attach_mode); + /* TODO: I find setting environment variables from within a program + * not a good thing to do, but for the meantime this helps... */ + putenv("LIBXDP_SKIP_DISPATCHER=1"); + err = xdp_program__attach(xdp->bpf_prog, xdp->interface_index, attach_mode, 0); + /* err = xdp_program__attach_single(xdp->bpf_prog, xdp->interface_index, attach_mode); */ if (err) { libxdp_strerror(err, errmsg, sizeof(errmsg)); log_msg(LOG_ERR, "xdp: could not attach xdp program to interface '%s' : %s\n",