]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: use prefix_len in test_tag when reading fdinfo
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 25 Jan 2017 23:42:49 +0000 (00:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Jan 2017 04:15:28 +0000 (23:15 -0500)
commite1eb11ddb8feb8f2fced0556e575e774db3d22d8
treed55161ddc68c74ec75faa8bfd219a6e593a14c17
parent65120eb9f364761443d0d4c1c6f8d968e0e0f9f9
bpf: use prefix_len in test_tag when reading fdinfo

We currently used len instead of prefix_len for the strncmp() in
fdinfo on the prog_tag. It still worked as we matched on the correct
output line also with first 8 instead of 10 chars, but lets fix it
properly to use the intended length.

Fixes: 212281fa7f61 ("bpf: add prog tag test case to bpf selftests")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/bpf/test_tag.c