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] [day] [month] [year] [list]
Date: Wed, 5 Jun 2024 11:21:55 +0000
From: Christian Hopps <chopps@...n.net>
To: David Ahern <dsahern@...il.com>
CC: Christian Hopps <chopps@...n.net>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "devel@...ux-ipsec.org" <devel@...ux-ipsec.org>,
	Antony Antony <antony.antony@...unet.com>
Subject: Re: [PATCH iproute-next v1 1/2] xfrm: add SA direction attribute

Thanks!

I'm new to this process so I'd certainly like to do this the right way next time. Should I have labeled the patch as "refactoring" as well? Without the addition of the new attribute value though there was nothing to refactor (be shared) so not sure how I would have split the patch up into 2 patches if that is what you were asking for.

Thanks for your patience and time,
Chris.

> On Jun 4, 2024, at 18:55, David Ahern <dsahern@...il.com> wrote:
> 
> 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