Skip to content

Commit

Permalink
xdp: fix compiling of xdp_ddos01_blacklist_cmdline.c on Ubuntu 17.04
Browse files Browse the repository at this point in the history
Userspace programs should use __u32 and not u32.

This fix a compile problem on Ubuntu 17.04, reported by Jay Vosburgh.
Giving him credit for fixing this.

Fixes: 888606b ("samples/bpf: xdp_ddos01 add support for port blacklisting")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
  • Loading branch information
jay-vosburgh authored and netoptimizer committed Apr 26, 2017
1 parent 293abee commit 7e879ec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/samples/bpf/xdp_ddos01_blacklist_cmdline.c
Expand Up @@ -13,7 +13,6 @@ static const char *__doc__=
#include <string.h>
#include <unistd.h>
#include <locale.h>
#include <linux/bitops.h>

#include <sys/resource.h>
#include <getopt.h>
Expand Down Expand Up @@ -212,7 +211,7 @@ static void blacklist_print_proto(int key, __u64 count)
printf("\n\t\"%s\" : %llu", xdp_proto_filter_names[key], count);
}

static void blacklist_print_port(int key, u32 val, int countfds[])
static void blacklist_print_port(int key, __u32 val, int countfds[])
{
int i;
__u64 count;
Expand Down

0 comments on commit 7e879ec

Please sign in to comment.