[PATCH] dumpcap: correctly disable promiscuous mode at exit

Stephen Hemminger stephen at networkplumber.org
Tue Feb 27 19:07:48 CET 2024


On Tue, 27 Feb 2024 11:23:26 +0200
Isaac Boukris <iboukris at gmail.com> wrote:

> Signed-off-by: Isaac Boukris <iboukris at gmail.com>
> ---
>  app/dumpcap/main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
> index d57db0589a..88cec43086 100644
> --- a/app/dumpcap/main.c
> +++ b/app/dumpcap/main.c
> @@ -830,11 +830,12 @@ static void enable_pdump(struct rte_ring *r, struct rte_mempool *mp)
>  				intf->opts.promisc_mode = false;
>  			} else {
>  				ret = rte_eth_promiscuous_enable(intf->port);
> -				if (ret != 0)
> +				if (ret != 0) {
>  					fprintf(stderr,
>  						"port %u set promiscuous enable failed: %d\n",
>  						intf->port, ret);
> -				intf->opts.promisc_mode = false;
> +					intf->opts.promisc_mode = false;
> +				}
>  			}
>  		}
>  		++count;

Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>


More information about the dev mailing list