[dpdk-stable] [PATCH] testpmd: fix init mpls struct
Ferruh Yigit
ferruh.yigit at intel.com
Fri Jan 31 12:01:14 CET 2020
On 1/30/2020 4:18 PM, Ori Kam wrote:
> When adding mpls item we copy the structure, in some cases
> the item is not initialized.
>
> This commit solves this by initializing the struct.
>
> Coverity issue: 325734
> Fixes: a1191d39cb57 ("app/testpmd: add MPLSoUDP encapsulation")
> Cc: stable at dpdk.org
>
> Signed-off-by: Ori Kam <orika at mellanox.com>
> ---
> app/test-pmd/cmdline_flow.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index e99e24c..42d90f5 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -4576,7 +4576,9 @@ static int comp_set_raw_index(struct context *, const struct token *,
> struct rte_flow_item_gre gre = {
> .protocol = rte_cpu_to_be_16(ETHER_TYPE_MPLS_UNICAST),
> };
> - struct rte_flow_item_mpls mpls;
> + struct rte_flow_item_mpls mpls = {
> + .ttl = 0
I wasn't aware that this is valid 'c' syntax, no ',' at the end.
Anyway, I guess this patch has been superseded by following, right?
https://patches.dpdk.org/patch/65383/
"app/testpmd: fix uninitialized members of mpls"
> + };
> uint8_t *header;
> int ret;
>
>
More information about the stable
mailing list