Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
libbpf: fix typo in bpf_attach_xdp()
  • Loading branch information
lcp authored and drzaeus77 committed Aug 22, 2017
1 parent f72909f commit db8353b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cc/libbpf.c
Expand Up @@ -781,7 +781,7 @@ int bpf_attach_xdp(const char *dev_name, int progfd, uint32_t flags) {
// parse flags as passed by the user
if (flags) {
nla_xdp = (struct nlattr *)((char *)nla + nla->nla_len);
nla_xdp->nla_type = 3/*IFLA_XDP_SKB*/;
nla_xdp->nla_type = 3/*IFLA_XDP_FLAGS*/;
nla_xdp->nla_len = NLA_HDRLEN + sizeof(flags);
memcpy((char *)nla_xdp + NLA_HDRLEN, &flags, sizeof(flags));
nla->nla_len += nla_xdp->nla_len;
Expand Down

0 comments on commit db8353b

Please sign in to comment.