bpf: fix JSLT validation
authorHongbo Zheng <zhenghongbo3@huawei.com>
Thu, 22 Apr 2021 07:30:01 +0000 (15:30 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 5 May 2021 10:22:30 +0000 (12:22 +0200)
commitcdcee2ec9b81457f9059c3f3a007e69190672634
treeca45ab45ae44d0cbbe70015d11284aa4bade1682
parent8e2dd74f0afd3ef3358f1cca05afb20bda670207
bpf: fix JSLT validation

In function 'eval_jcc', judgment 'op == EBPF_JLT' occurs
twice, as a result, the corresponding second statement
cannot be accessed.

This patch fix this problem.

Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/bpf/bpf_validate.c