aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/samples/bpf/sock_example.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2016-03-07 21:57:20 -0800
committerDavid S. Miller <davem@davemloft.net>2016-03-08 15:28:32 -0500
commit89b976070190eb9dd14943c0d6ca4b7209f61405 (patch)
tree36762c9aedfdf442e89148c0079e6cc1cbebbd57 /samples/bpf/sock_example.c
parentsamples/bpf: move ksym_search() into library (diff)
downloadwireguard-linux-89b976070190eb9dd14943c0d6ca4b7209f61405.tar.xz
wireguard-linux-89b976070190eb9dd14943c0d6ca4b7209f61405.zip
samples/bpf: add map_flags to bpf loader
note old loader is compatible with new kernel. map_flags are optional Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf/sock_example.c')
-rw-r--r--samples/bpf/sock_example.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/sock_example.c b/samples/bpf/sock_example.c
index a0ce251c5390..28b60baa9fa8 100644
--- a/samples/bpf/sock_example.c
+++ b/samples/bpf/sock_example.c
@@ -34,7 +34,7 @@ static int test_sock(void)
long long value = 0, tcp_cnt, udp_cnt, icmp_cnt;
map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key), sizeof(value),
- 256);
+ 256, 0);
if (map_fd < 0) {
printf("failed to create map '%s'\n", strerror(errno));
goto cleanup;