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]
Message-ID: <2501c864-cbca-0b81-2e6a-0ee63473c31c@kernel.org>
Date:   Sun, 16 Apr 2023 10:37:15 -0600
From:   David Ahern <dsahern@...nel.org>
To:     Alexander Aring <aahringo@...hat.com>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, alex.aring@...il.com, daniel@...earbox.net,
        ymittal@...hat.com, mcascell@...hat.com,
        torvalds@...uxfoundation.org, mcr@...delman.ca
Subject: Re: [PATCH net] net: rpl: fix rpl header size calculation

On 4/15/23 3:05 PM, Alexander Aring wrote:
> diff --git a/net/ipv6/rpl.c b/net/ipv6/rpl.c
> index 488aec9e1a74..16e19fec18a4 100644
> --- a/net/ipv6/rpl.c
> +++ b/net/ipv6/rpl.c
> @@ -32,7 +32,7 @@ static void *ipv6_rpl_segdata_pos(const struct ipv6_rpl_sr_hdr *hdr, int i)
>  size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri,
>  			 unsigned char cmpre)
>  {
> -	return (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
> +	return 8 + (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);



no magic numbers; there should be a macro for that size.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ