From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A072A45D16 for ; Fri, 15 Nov 2024 21:08:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B866432A2; Fri, 15 Nov 2024 21:08:09 +0100 (CET) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id A9A9B40615 for ; Fri, 15 Nov 2024 21:08:04 +0100 (CET) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-7246c8c9b1cso18048b3a.3 for ; Fri, 15 Nov 2024 12:08:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731701284; x=1732306084; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lT/wNc2P8ykE5aaBawpuCCaCpIyLE/qYqFBGCMnYFm4=; b=L1frFWzjiQDriscW3uvjcKcSvYMuWZulCm7+O+IY1j6PSUtZyx5J3bqj12J9oJgrzY KVxp8m/zTyZQ4Gq0yEkqVr15XeVE9n8/7mD2L2lDjzaTo0TebJWUG1aznWP5Jvnm6aSn nMFK3nazu7ajFmgO+v8vCHFt3ZQJV51nJGIqTN+I/ZzAkddtOHIII7mtvW3BaT2h9oO/ RlCUZQqzaDUgbzwwpCajorPGrtvUUkWJP06Kf0lSrhGmHBsYCxl1gZQT4Cu2sDWWIcYu +E07qN9RnBO78DM0w2nT3Ddnv6fXZNRIo9z12o7fzm+5sdqP3KSKm+ytU8HsIWgeUGB4 kqTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731701284; x=1732306084; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lT/wNc2P8ykE5aaBawpuCCaCpIyLE/qYqFBGCMnYFm4=; b=TwgyDi70WKfw9pdnb8zIbyaENkqf6qk2Co8nCeUPpnZ+eEmY82EAj/sLndZj/H1ekI nqQrwMG5lm9xTk0TVgBd4jVb3cjNfMDQ8bGRMesPIaEsU41csEgOafRC7bMTzp49YbdZ kPX9rWfCkjHGtiNh8syByY/3oCw9Xagg90PZmmtHCIKyt19glivT62UvihoNZ/pK8JgA lmW8haqu6iKfPAeMEt6NeuFveAHLrj4229a3iYYtJSIbwtJ6GjSFjgscJ1U4hyLFqDOb vD18nM/lApCXOyofaqGKLlm1oC8MF6x7k/y7zH+B/CTTt8Mq3q6s9vju2rOq5kjcU9Qu Yk1g== X-Forwarded-Encrypted: i=1; AJvYcCVuwLSVllEnj+V5TnKUAUYgABs8sNI5skBzx2TrD0XgGlv1gZUU2VnEkOufLFCBheYctRWNCgs=@dpdk.org X-Gm-Message-State: AOJu0YzQhd6bB1HkUvkkXf9zZ+P9gz8a9lmA/R+uN9L3aoxCnPG/V3I3 bcseod+6v69f4ku6Q6r8cmRy7rEGa9dcBJMF2hncN/ORnlPbKfn4rodrD3NgJOU= X-Google-Smtp-Source: AGHT+IF184KTqc+YVBNU+2ZIc5GTEy+FytilGTLYsWdrBMaO8omQaZdASyeGGggaoO7QFU40dUcISw== X-Received: by 2002:a05:6a00:1889:b0:71e:f83:5c00 with SMTP id d2e1a72fcca58-72476b7286emr5902568b3a.2.1731701283865; Fri, 15 Nov 2024 12:08:03 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724771e11f0sm1759686b3a.131.2024.11.15.12.08.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2024 12:08:03 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , ndabilpuram@marvell.com, stable@dpdk.org, Bruce Richardson , Akhil Goyal , Anoob Joseph Subject: [PATCH v3 03/10] app/test: fix paren typo Date: Fri, 15 Nov 2024 12:06:47 -0800 Message-ID: <20241115200751.17141-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241115200751.17141-1-stephen@networkplumber.org> References: <20241114001403.147609-1-stephen@networkplumber.org> <20241115200751.17141-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org The parenthesis were in the wrong place so that comparison took precedence over assignment in handling IPv6 extension headers. Break up the loop condition to avoid the problem. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: 15ccc647526e ("test/security: test inline reassembly with multi-segment") Cc: ndabilpuram@marvell.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- app/test/test_security_inline_proto_vectors.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/test/test_security_inline_proto_vectors.h b/app/test/test_security_inline_proto_vectors.h index b3d724bac6..86dfa54777 100644 --- a/app/test/test_security_inline_proto_vectors.h +++ b/app/test/test_security_inline_proto_vectors.h @@ -519,10 +519,12 @@ test_vector_payload_populate(struct ip_reassembly_test_packet *pkt, if (extra_data_sum) { proto = hdr->proto; p += sizeof(struct rte_ipv6_hdr); - while (proto != IPPROTO_FRAGMENT && - (proto = rte_ipv6_get_next_ext(p, proto, &ext_len) >= 0)) + while (proto != IPPROTO_FRAGMENT) { + proto = rte_ipv6_get_next_ext(p, proto, &ext_len); + if (proto < 0) + break; p += ext_len; - + } /* Found fragment header, update the frag offset */ if (proto == IPPROTO_FRAGMENT) { frag_ext = (struct rte_ipv6_fragment_ext *)p; -- 2.45.2