lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 3 May 2023 18:27:08 +0000
From: Alexander Duyck <alexanderduyck@...a.com>
To: David Ahern <dsahern@...nel.org>, "mkubecek@...e.cz" <mkubecek@...e.cz>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH ethtool] rxclass: Fix return code in rxclass_rule_ins

> -----Original Message-----
> From: David Ahern <dsahern@...nel.org>
> Sent: Wednesday, May 3, 2023 9:51 AM
> To: mkubecek@...e.cz
> Cc: netdev@...r.kernel.org; David Ahern <dsahern@...nel.org>; Alexander
> Duyck <alexanderduyck@...a.com>
> Subject: [PATCH ethtool] rxclass: Fix return code in rxclass_rule_ins
> 
> > 
> ethtool is not exiting non-0 when -N fails. e.g.,
> 
> $ sudo ethtool -N eth0 flow-type tcp4 src-ip 1.2.3.4 action 3 loc 1023
> rmgr: Cannot insert RX class rule: No such device $ echo $?
> 0
> 
> Update rxclass_rule_ins to return err.
> 
> Fixes: 8d63f72ccdcb ("Add RX packet classification interface")
> Cc: Alexander Duyck <alexanderduyck@...com>
> Signed-off-by: David Ahern <dsahern@...nel.org>
> ---
>  rxclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rxclass.c b/rxclass.c
> index 6cf81fdafc85..66cf00ba7728 100644
> --- a/rxclass.c
> +++ b/rxclass.c
> @@ -598,7 +598,7 @@ int rxclass_rule_ins(struct cmd_context *ctx,
>  	else if (loc & RX_CLS_LOC_SPECIAL)
>  		printf("Added rule with ID %d\n", nfccmd.fs.location);
> 
> -	return 0;
> +	return err;
>  }
> 
>  int rxclass_rule_del(struct cmd_context *ctx, __u32 loc)
> --
> 2.25.1

Yeah, looks like it was a brain-o on my part that I just went straight to return 0.

Acked-by: Alexander Duyck <alexanderduyck@...com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ