[1/6] test/bpf: make sure mbuf is initialized
Checks
Commit Message
The BPF filter test was not initializing off load flags.
Coverity issue: 375844
Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/test_bpf.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Fri, Mar 01, 2024 at 09:57:06AM -0800, Stephen Hemminger wrote:
> The BPF filter test was not initializing off load flags.
>
> Coverity issue: 375844
> Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
@@ -3341,6 +3341,7 @@ test_bpf_filter_sanity(pcap_t *pcap)
struct rte_ipv4_hdr ip_hdr;
} *hdr;
+ memset(&mb, 0, sizeof(mb));
dummy_mbuf_prep(&mb, tbuf, sizeof(tbuf), plen);
m = &mb;