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 0F23AA00C2 for ; Wed, 4 Jan 2023 17:18:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 038BB42D2A; Wed, 4 Jan 2023 17:18:42 +0100 (CET) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id 12E5342D2A for ; Wed, 4 Jan 2023 17:18:41 +0100 (CET) Received: by mail-pg1-f174.google.com with SMTP id 36so22538700pgp.10 for ; Wed, 04 Jan 2023 08:18:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=H0ulSLyWPt/gXhFMK/hujsHVO7GkTFb3PBsd96a7Wo8=; b=jvWKcR+ZfzRnBFnwIuFj5PhLTBONB/wEhV/p7mirqc+aTIS+4wq3Sh5YFFp8IUT62s b8T43+MNFs9NIjTR+2p7ihmrehtqjETpNXoe61Ly3z075p7sYRY98FQWLjghDwfL7LSS 1rTw9by2dLkJfQGHG5sF/rhbo8wiX1B8hGIYyCsmXSMo5t8pBMkZLirZQI0mGINldGP+ lk4ej+9Z1hJm7k065V5+Kzd7d7D2byncX/as8S3Oymo9sXzeVDLHp5aSJXOb26rHcvwg jLtxachJLrYbG5VVA1Qbjy9FXbJzXZeoBgav08mNPADJALOyetoMm86bKb35kLnhkzAZ zH9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H0ulSLyWPt/gXhFMK/hujsHVO7GkTFb3PBsd96a7Wo8=; b=kVZ0J7blDHF+TGxTwgFyJrG9FpwAzz1ft/cljlOKhy/8n2miJoLNvtDDIRhRvtnb3m QMU0kahJSlwht14T5FqEUR2IzGvfzJMo83CsfsDO3TXncm8Kp2A7r5SnBe0tbHV3YH9B VYuqJzBzwpMn92ZJ3jHH3sUtkro631plVTTZudp7XIRLVpVF7pOq62nA1ulW4O9gpdiW BAtOEsxR0v4lS39nIx4i9lxU9z2IwQSTuyg8fQhSZh1Xh748GxmAvAgYKGAp3+xk4Pke oOVEHRN4d7WE1JNTwf0XwKoXTxEY9kz2ljI9K8y+W6Z01XpkAi948KDn40SPatH1C2Ik QE/Q== X-Gm-Message-State: AFqh2kraBLFmCbQZOlphKT902PH1F7tpVVE/jBld3ELyvft7IoQ7fD02 ySP/vMpjGz6EoVdx/kVuJf6VK0lsuFTEt/+otzE= X-Google-Smtp-Source: AMrXdXtJoUIogaLF5R+S2xKYu0hKbrZd6AMMUErrsWvSHt6WECyys64oLa418kewrEMJoFV0FLvtbQ== X-Received: by 2002:a62:b514:0:b0:581:a55:d213 with SMTP id y20-20020a62b514000000b005810a55d213mr30705897pfe.29.1672849120307; Wed, 04 Jan 2023 08:18:40 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id i123-20020a625481000000b00574ebfdc721sm23505962pfb.16.2023.01.04.08.18.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 08:18:40 -0800 (PST) Date: Tue, 3 Jan 2023 19:04:56 -0800 From: Stephen Hemminger To: Ben Magistro Cc: dev@dpdk.org, ben.magistro@trinitycyber.com, stable@dpdk.org Subject: Re: [PATCH 2/6] app/dumpcap: fix storing port identifier Message-ID: <20230103190456.58d39457@hermes.local> In-Reply-To: <20230102162441.6205-2-koncept1@gmail.com> References: <20230102162441.6205-1-koncept1@gmail.com> <20230102162441.6205-2-koncept1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Mon, 2 Jan 2023 16:24:37 +0000 Ben Magistro wrote: > When dumpcap adds an interface, the port was not being preserved. This > results in the structure being initialized and the port field being set > to 0 regardless of what port was actually selected. This unset field is > then used in both the enable and cleanup calls. This could result in the > capture occurring on the wrong interface. > > Fixes: d59fb4d ("app/dumpcap: add new packet capture application") > Cc: stephen@networkplumber.org > Cc: stable@dpdk.org > > Signed-off-by: Ben Magistro > --- > app/dumpcap/main.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c > index b9096f050c..aaee9349b1 100644 > --- a/app/dumpcap/main.c > +++ b/app/dumpcap/main.c > @@ -202,6 +202,7 @@ static void add_interface(uint16_t port, const char *name) > rte_exit(EXIT_FAILURE, "no memory for interface\n"); > > memset(intf, 0, sizeof(*intf)); > + intf->port = port; > rte_strscpy(intf->name, name, sizeof(intf->name)); > > printf("Capturing on '%s'\n", name); LGTM Already set in the fix patch set