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:	Thu, 20 Dec 2012 02:27:35 +0900
From:	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
To:	Bjørn Mork <bjorn@...k.no>
CC:	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>, davem@...emloft.net,
	netdev@...r.kernel.org
Subject: Re: [GIT PULL net-next 04/17] ndisc: Introduce ndisc_fill_redirect_hdr_option().

(2012年12月20日 01:25), YOSHIFUJI Hideaki wrote:
> Bjørn Mork wrote:
>> YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org> writes:

>>> +static u8 *ndisc_fill_redirect_hdr_option(u8 *opt, struct sk_buff *orig_skb,
>>> +					  int rd_len)
>>> +{
>>> +	memset(opt, 0, 8);
>>> +	*(opt++) = ND_OPT_REDIRECT_HDR;
>>> +	*(opt++) = (rd_len >> 3);
>>> +	opt += 6;
>>> +
>>> +	memcpy(opt, ipv6_hdr(orig_skb), rd_len - 8);
>>> +
>>> +	return opt;
>>> +}
:
>> I understand that opt isn't currently used after this, but if it ever is
>> then it is going to come as big a surprise that this implies opt += 8;
>>
>> This was previously quite clear when the code was inline, but it becomes
>> problematic when it is factored out.
> 
> I understand your concern.  opt will be disappeared by following
> changeset (12 of 17).

Argh, I now notice return value was not quite right; it should
return opt + rd_len - 8.

Fixed in my local tree.  Thanks.

--yoshfuji

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ