From 6387d0111ca4740b69a082a92fc373185af11133 Mon Sep 17 00:00:00 2001 From: Jesper Dangaard Brouer Date: Mon, 1 May 2017 11:26:15 +0200 Subject: samples/bpf: fix SKB_MODE flag to be a 32-bit unsigned int The kernel side of XDP_FLAGS_SKB_MODE is unsigned, and the rtnetlink IFLA_XDP_FLAGS is defined as NLA_U32. Thus, userspace programs under samples/bpf/ should use the correct type. Fixes: 3993f2cb983b ("samples/bpf: Add support for SKB_MODE to xdp1 and xdp_tx_iptunnel") Signed-off-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Reviewed-by: Andy Gospodarek Signed-off-by: David S. Miller --- samples/bpf/bpf_load.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'samples/bpf/bpf_load.c') diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c index 0ec0dea3c41e..4221dc359453 100644 --- a/samples/bpf/bpf_load.c +++ b/samples/bpf/bpf_load.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -585,7 +586,7 @@ struct ksym *ksym_search(long key) return &syms[0]; } -int set_link_xdp_fd(int ifindex, int fd, int flags) +int set_link_xdp_fd(int ifindex, int fd, __u32 flags) { struct sockaddr_nl sa; int sock, seq = 0, len, ret = -1; -- cgit v1.2.3-59-g8ed1b