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: Tue, 4 Jun 2024 16:55:37 -0600
From: David Ahern <dsahern@...il.com>
To: Christian Hopps <chopps@...n.net>, netdev@...r.kernel.org
Cc: devel@...ux-ipsec.org, Christian Hopps <chopps@...pps.org>,
 Antony Antony <antony.antony@...unet.com>
Subject: Re: [PATCH iproute-next v1 1/2] xfrm: add SA direction attribute

On 5/23/24 9:17 AM, Christian Hopps wrote:
> Add support for new SA direction netlink attribute.
> 
> Co-developed-by: Antony Antony <antony.antony@...unet.com>
> Co-developed-by: Christian Hopps <chopps@...n.net>
> Signed-off-by: Christian Hopps <chopps@...n.net>
> ---
>  include/uapi/linux/xfrm.h |  6 +++++
>  ip/ipxfrm.c               | 12 ++++++++++
>  ip/xfrm_state.c           | 49 ++++++++++++++++++++++++++-------------
>  3 files changed, 51 insertions(+), 16 deletions(-)
> 


> @@ -251,22 +251,20 @@ static int xfrm_state_extra_flag_parse(__u32 *extra_flags, int *argcp, char ***a
>  	return 0;
>  }
>  
> -static bool xfrm_offload_dir_parse(__u8 *dir, int *argcp, char ***argvp)
> +static void xfrm_dir_parse(__u8 *dir, int *argcp, char ***argvp)
>  {
>  	int argc = *argcp;
>  	char **argv = *argvp;
>  
>  	if (strcmp(*argv, "in") == 0)
> -		*dir = XFRM_OFFLOAD_INBOUND;
> +		*dir = XFRM_SA_DIR_IN;
>  	else if (strcmp(*argv, "out") == 0)
> -		*dir = 0;
> +		*dir = XFRM_SA_DIR_OUT;
>  	else
> -		return false;
> +		invarg("DIR value is not \"in\" or \"out\"", *argv);
>  
>  	*argcp = argc;
>  	*argvp = argv;
> -
> -	return true;
>  }
>  
>  static int xfrm_state_modify(int cmd, unsigned int flags, int argc, char **argv)


next time send a refactoring patch when changing existing code like
this. I wasted a lot of time trying to figure out if you are changing
ABI with the move from XFRM_OFFLOAD_INBOUND to XFRM_SA_DIR_IN/OUT here.

applied to iproute2-next

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ