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 14575A00C4 for ; Mon, 2 Jan 2023 17:58:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0958242D24; Mon, 2 Jan 2023 17:58:05 +0100 (CET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id C4E0B42BC9 for ; Mon, 2 Jan 2023 17:58:03 +0100 (CET) Received: by mail-pg1-f170.google.com with SMTP id d10so18604658pgm.13 for ; Mon, 02 Jan 2023 08:58:03 -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=Jdflnq1HzNXNVGWWT+18P1pLqKgw/FpWdukICMcZ7VE=; b=4v1/BPB8jFoAyPvuSYYKD/ljH+vV4f4sUdTibtDLbktGoVgR3VelaOJk+8et/xYO77 6LdWRDmQHSqdWE15Y+0NeAxa5ZoDBNVcuUp/SLrTwP4MChLlTXj/SKs/dH5XHbuLwncb fkYqQbf0v5WHC9PHNfi4b3vjEs+JmlBHaOSG64kBhPob+tReNgWxivL9BpddPcexAcPl N24XSUms2+5eE/ywWfoFNKXf7/OfSdwBOxIZMH6laX1Yyn0mzgFULaCIKvNPbCcNJBtC dO7PpDiX6uM7OJBAclbdrGGCaHdRRGfWoL2CMYL3Gnf60A+Wod6z8XlL3hoGg+K6TC36 HtvA== 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=Jdflnq1HzNXNVGWWT+18P1pLqKgw/FpWdukICMcZ7VE=; b=Q5JIRtYhROz1Cdc14ivt3K0Akc29ZF14Wj6sdHcRNGzxwHzqH2lsX4gPpfpnJM4lFy iHsp4N/49/wK/jN+azLdGlWaSjT5dKBy5Nng/bE2SjIwkzEBTkq4ZrbU8nb4I2IsIusv AdanWoRU7HiMIkUMqzf+C+s4lfhrBow66mqYEIe1/qJpTD0/VWgHjL/8HmO7b7BJIBQP ClDA3jzXHezBHDMeh2fIRcRiXh3mJAGU25t88RBN5wXEytzxrKmuexyfNz6B8WU+V2zx G6yxoFTCqNXHeclwBc5/zyWTkKYJzCnADhmlvXT1P0MKJlaaaOuSsTlMbYHvm3LY2XSW SjDg== X-Gm-Message-State: AFqh2kqeTxlUAQSSucjCw4Y7Ow4f0nzB3c24p02ljWZV2N6e1vKW2Zlv Q5G3rOcbRNtEUVmUeVIm9tOGpQ== X-Google-Smtp-Source: AMrXdXtsZDIJ7+PcqAtJN+AQwVB58QKnmRFaFQEqOLW46prQlUYwpEYzHAvnieBY83EHfQm/BqFeVQ== X-Received: by 2002:a62:2545:0:b0:581:fc19:4aa3 with SMTP id l66-20020a622545000000b00581fc194aa3mr13392745pfl.0.1672678682852; Mon, 02 Jan 2023 08:58:02 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id y188-20020a6264c5000000b00580e3917af7sm15676501pfb.117.2023.01.02.08.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Jan 2023 08:58:02 -0800 (PST) Date: Mon, 2 Jan 2023 08:58:02 -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: <20230102085802.76a54cd2@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); Will be superseded by my fixes to port setup.